nl_tokens: Normalize the text inside an element
pl_tokens: function normalize ( node ) { if ( ! ( isElement ( <mask> ) || isDocument ( node ) || isDocumentFragment ( node ) ) ) { return ; } if ( ! node . childNodes ) { return ; } var textRangeStart = - 1 ; for ( var i = node . childNodes . length - 1 , n = void 0 ; i >= 0 ; i -- ) { n = node . childNodes [ i ] ; if ( isTextNode ( n ) ) { if ( textRangeStart === - 1 ) { textRangeStart = i ; } if ( i === 0 ) { // collapse leading text nodes collapseTextRange ( node , 0 , textRangeStart ) ; } } else { // recurse normalize ( n ) ; // collapse the range after this node if ( textRangeStart > - 1 ) { collapseTextRange ( node , i + 1 , textRangeStart ) ; textRangeStart = - 1 ; } } } }