@@ -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*/
1313function 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*/
2930function 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
149149linkifyElement . helper = linkifyElementHelper ;
150150linkifyElement . normalize = options . normalize ;
151151
0 commit comments