nl_tokens: Serialize dom
pl_tokens: function serializeDom ( dom , opts ) { if ( ! Array . isArray ( dom ) ) { dom = [ dom ] ; } opts = opts || { } ; let output = '' ; for ( let i = 0 , len = dom . length ; i < len ; i ++ ) { let elem = dom [ i ] ; if ( elem . removed ) { // ignore removed node continue ; } if ( elem . type === 'root' ) { output += serializeDom ( elem . children , opts ) ; } else if ( ElementType . isTag ( elem ) ) { output += serializeTag ( elem , opts ) ; } else if ( elem . type === ElementType . Directive ) { output += serializeDirective ( elem ) ; } else if ( elem . type === ElementType . Comment ) { <mask> += serializeComment ( elem ) ; } else if ( elem . type === ElementType . CDATA ) { output += serializeCDATA ( elem ) ; } else { output += serializeText ( elem , opts ) ; } } return output ; }