Open RomainFranceschini opened 1 year ago
Currently when an invalid tag is emitted from the lexer, the parser renders the tag as a text node but strips all attributes.
Example:
parse('[h1 name=value]Foo [Bar=Quz]Quux[/Bar] [/h1]', validTags: {'h1'});
results in the following AST:
[ Element( 'h1', {'name': 'value'}, [ Text('Foo'), Text(' '), Text('[Bar]'), Text('Quux'), Text('[/Bar]'), Text(' '), ], ) ]
Expected result:
[ Element( 'h1', {'name': 'value'}, [ Text('Foo'), Text(' '), Text('[Bar=Quz]'), Text('Quux'), Text('[/Bar]'), Text(' '), ], ) ]
Currently when an invalid tag is emitted from the lexer, the parser renders the tag as a text node but strips all attributes.
Example:
results in the following AST:
Expected result: