Hi! I was trying out the lexer and I noticed that this block:
<script>"<style></style>"</script>
outputs the following sequence:
[ 'startTagStart', '<' ]
[ 'tagName', 'script' ]
[ 'tagEnd', '>' ]
[ 'rawtext', '"' ]
[ 'rawtext', '<style>' ]
[ 'endTagStart', '</' ]
[ 'tagName', 'style' ]
[ 'rawtext', '>"' ]
[ 'endTagStart', '</' ]
[ 'tagName', 'script' ]
[ 'tagEnd', '>' ]
As far as I know, the </style> should not be tokenized as an end tag because in a script block, the only valid end tag is </script> (not case sensitive and with optional whitespace between the /script and the >).
The readme mentions that script tags aren't fully handled, but I wasn't expecting this particular exception :) Is it expected behavior, given that the endTagStart and tagName are followed by a rawtext rather than a tagEnd and thus don't truly close the block?
Hi! I was trying out the lexer and I noticed that this block:
outputs the following sequence:
As far as I know, the
</style>should not be tokenized as an end tag because in a script block, the only valid end tag is</script>(not case sensitive and with optional whitespace between the/scriptand the>).The readme mentions that script tags aren't fully handled, but I wasn't expecting this particular exception :) Is it expected behavior, given that the
endTagStartandtagNameare followed by arawtextrather than atagEndand thus don't truly close the block?