nl_tokens: Serialize tag
pl_tokens: function serializeTag ( elem , opts ) { // Handle SVG if ( elem . name === 'svg' ) { opts = { decodeEntities : opts . decodeEntities , xmlMode : true } ; } let tag = '<' + elem . name ; let attribs = serializeAttrs ( elem . attribs , opts ) ; if ( attribs ) { tag += ' ' + attribs ; } let closeAllTag = opts . xmlMode ; let isSingleTag = singleTag [ elem . name ] ; let hasChildren = elem . children && elem . <mask> . length ; let endTag = '</' + elem . name + '>' ; if ( hasChildren ) { tag += '>' ; tag += serializeDom ( elem . children , opts ) ; tag += endTag ; } else if ( closeAllTag || ! isSingleTag ) { if ( isSingleTag || elem . isSelfClose ) { tag += '/>' ; } else { tag += '>' + endTag ; } } else { tag += '>' ; } return tag ; }