Skip to content

Commit 25c2d7d

Browse files
committed
typos
1 parent ea876d6 commit 25c2d7d

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ Option | Default | Description
7878
----------------------- | ------------ | -----------
7979
`baseElements` | | Describes which parts of the input document have to be converted and present in the output text, and in what order.
8080
`baseElements.selectors` | `['body']` | Elements matching any of provided selectors will be processed and included in the output text, with all inner content.<br/>Refer to [Supported selectors](#supported-selectors) section below.
81-
`baseElements.orderBy` | `selectors` | `'selectors'` - arrange base elements in the same order as `baseElements.selectors` array;<br/>`'occurrence'` - arrange base elements in the order they are found in the input document.
81+
`baseElements.orderBy` | `'selectors'` | `'selectors'` - arrange base elements in the same order as `baseElements.selectors` array;<br/>`'occurrence'` - arrange base elements in the order they are found in the input document.
8282
`baseElements.returnDomByDefault` | `true` | Convert the entire document if none of provided selectors match.
83-
`decodeOptions` | `{ isAttributeValue: false, strict: false }` | Text decoding options given to `he.decode`. For more informations see the [he](https://github.com/mathiasbynens/he) module.
83+
`decodeOptions` | `{ isAttributeValue: false, strict: false }` | Text decoding options given to `he.decode`. For more information see the [he](https://github.com/mathiasbynens/he) module.
8484
`formatters` | `{}` | An object with custom formatting functions for specific elements (see [Override formatting](#override-formatting) section below).
8585
`limits` | | Describes how to limit the output text in case of large HTML documents.
8686
`limits.ellipsis` | `'...'` | A string to insert in place of skipped content.
@@ -166,7 +166,7 @@ You can match `<p style="...; display:INLINE; ...">...</p>` with `p[style*="disp
166166

167167
##### Predefined formatters
168168

169-
Following selectors have a formatter specified as a part of the default configuration. Everything can be overriden, but you don't have to repeat the `format` or options that you don't want to override. (But keep in mind this is only true for the same selector. There is no connection between different selectors.)
169+
Following selectors have a formatter specified as a part of the default configuration. Everything can be overridden, but you don't have to repeat the `format` or options that you don't want to override. (But keep in mind this is only true for the same selector. There is no connection between different selectors.)
170170

171171
Selector | Default&nbsp;format | Notes
172172
------------- | ------------------- | -----

lib/block-text-builder.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class BlockTextBuilder {
2929
constructor (options, picker) {
3030
this.options = options;
3131
this.picker = picker;
32-
this.whitepaceProcessor = new WhitespaceProcessor(options);
32+
this.whitespaceProcessor = new WhitespaceProcessor(options);
3333
/** @type { StackItem } */
3434
this._stackItem = new BlockStackItem(options);
3535
/** @type { TransformerStackItem } */
@@ -135,13 +135,13 @@ class BlockTextBuilder {
135135
}
136136

137137
if (
138-
this.whitepaceProcessor.testContainsWords(str) || // There are words to add;
138+
this.whitespaceProcessor.testContainsWords(str) || // There are words to add;
139139
(str.length && !this._stackItem.stashedLineBreaks) // or at least spaces to take into account.
140140
) {
141141
if (this._stackItem.stashedLineBreaks) {
142142
this._stackItem.inlineTextBuilder.startNewLine(this._stackItem.stashedLineBreaks);
143143
}
144-
this.whitepaceProcessor.shrinkWrapAdd(
144+
this.whitespaceProcessor.shrinkWrapAdd(
145145
str,
146146
this._stackItem.inlineTextBuilder,
147147
(this._wordTransformer && !noWordTransform) ? this._getCombinedWordTransformer() : undefined
@@ -320,7 +320,7 @@ class BlockTextBuilder {
320320
* @param { object | number } [optionsObjectOrColSpacing]
321321
* Object holding the parameters of the table.
322322
*
323-
* Number value is depreceted.
323+
* Number value is deprecated.
324324
*
325325
* @param { number } [optionsObjectOrColSpacing.colSpacing = 3]
326326
* Number of spaces between table columns.

lib/formatter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ function formatAnchor (elem, walk, builder, formatOptions) {
199199
* @param { RecursiveCallback } walk Recursive callback to process child nodes.
200200
* @param { BlockTextBuilder } builder Passed around to accumulate output text.
201201
* @param { FormatOptions } formatOptions Options specific to a formatter.
202-
* @param { () => string } nextPrefixCallback Function that returns inreasing index each time it is called.
202+
* @param { () => string } nextPrefixCallback Function that returns increasing index each time it is called.
203203
*/
204204
function formatList (elem, walk, builder, formatOptions, nextPrefixCallback) {
205205
const isNestedList = get(elem, ['parent', 'name']) === 'li';
@@ -208,7 +208,7 @@ function formatList (elem, walk, builder, formatOptions, nextPrefixCallback) {
208208
// so the dumb length comparison is the most robust way to get the correct value.
209209
let maxPrefixLength = 0;
210210
const listItems = (elem.children || [])
211-
// it might be more accuurate to check only for html spaces here, but no significant benefit
211+
// it might be more accurate to check only for html spaces here, but no significant benefit
212212
.filter(child => child.type !== 'text' || !/^\s*$/.test(child.data))
213213
.map(function (child) {
214214
if (child.name !== 'li') {

lib/typedefs.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @property { DecodeOptions } [decodeOptions]
1010
* Text decoding options given to `he.decode`.
1111
*
12-
* For more informations see the [he](https://github.com/mathiasbynens/he) module.
12+
* For more information see the [he](https://github.com/mathiasbynens/he) module.
1313
*
1414
* @property { object.< string, FormatCallback > } [formatters = {}]
1515
* A dictionary with custom formatting functions for specific kinds of elements.
@@ -69,13 +69,13 @@
6969
* @typedef { object } DecodeOptions
7070
* Text decoding options given to `he.decode`.
7171
*
72-
* For more informations see the [he](https://github.com/mathiasbynens/he) module.
72+
* For more information see the [he](https://github.com/mathiasbynens/he) module.
7373
*
7474
* @property { boolean } [isAttributeValue = false]
75-
* TLDR: If set to `true` - leave attribute values raw, don't parse them as text content.
75+
* TL;DR: If set to `true` - leave attribute values raw, don't parse them as text content.
7676
*
7777
* @property { boolean } [strict = false]
78-
* TLDR: If set to `true` - throw an error on invalid HTML input.
78+
* TL;DR: If set to `true` - throw an error on invalid HTML input.
7979
*/
8080

8181
/**

0 commit comments

Comments
 (0)