Skip to content

Commit e118379

Browse files
author
nfrasser
committed
Docs style and spelling fixes for linkify-element
1 parent dd1cc13 commit e118379

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/linkify-element.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const HTML_NODE = 1, TXT_NODE = 3;
88

99
/**
1010
Given a parent element and child node that the parent contains, replaces
11-
that child with the given aary of new children
11+
that child with the given array of new children
1212
*/
1313
function replaceChildWithChildren(parent, oldChild, newChildren) {
1414
let lastNewChild = newChildren[newChildren.length - 1];
@@ -22,9 +22,10 @@ function replaceChildWithChildren(parent, oldChild, newChildren) {
2222
/**
2323
Given an array of MultiTokens, return an array of Nodes that are either
2424
(a) Plain Text nodes (node type 3)
25-
(b) Anchor tag nodes (usually, unless tag name is overriden in the options)
25+
(b) Anchor tag nodes (usually, unless tag name is overridden in the options)
2626
27-
Takes the same options as linkifyElement and an optional doc element (this should be passed in by linkifyElement)
27+
Takes the same options as linkifyElement and an optional doc element
28+
(this should be passed in by linkifyElement)
2829
*/
2930
function tokensToNodes(tokens, opts, doc) {
3031
let result = [];
@@ -144,8 +145,7 @@ function linkifyElement(element, opts, doc=null) {
144145
return linkifyElementHelper(element, opts, doc);
145146
}
146147

147-
// Maintain reference to the recursive helper to save some option-normalization
148-
// cycles
148+
// Maintain reference to the recursive helper to cache option-normalization
149149
linkifyElement.helper = linkifyElementHelper;
150150
linkifyElement.normalize = options.normalize;
151151

0 commit comments

Comments
 (0)