nl_tokens: Convert node ( hast ) to nlcst .
pl_tokens: function <mask> ( node ) { var type = node . type var tagName = type === 'element' ? node . tagName : null var change var replacement if ( type === 'text' ) { change = true replacement = parser . tokenize ( node . value ) } else if ( tagName === 'wbr' ) { change = true replacement = [ parser . tokenizeWhiteSpace ( ' ' ) ] } else if ( tagName === 'br' ) { change = true replacement = [ parser . tokenizeWhiteSpace ( '\n' ) ] } else if ( sourced ( node ) ) { change = true replacement = [ parser . tokenizeSource ( textContent ( node ) ) ] } else if ( type === 'root' || ! ignored ( node ) ) { replacement = all ( node . children ) } else { return } if ( ! change ) { return replacement } return patch ( replacement , location , location . toOffset ( position . start ( node ) ) ) }