4 ms·
Correct me if I'm wrong, but I believe HTML tags can still be lexed with a regular expression. The syntax of the script element is cryptic, but it does not cont
by goto11 5y ago
Correct me if I'm wrong, but I believe HTML tags can still be lexed with a regular expression. The syntax of the script element is cryptic, but it does not contain any recursive productions, so it should still be possible to lex correctly with a regular expression.
- jameshart 5y agoYour lexer now needs to understand JavaScript too, though.
- deleted 5y ago[deleted]
- goto11 5y agoThe content model of the script element is gnarly for historical reasons, but it does not depend on the syntax of the scripting language used: https://html.spec.whatwg.org/multipage/scripting.html#restrictions-for-contents-of-script-elements https://html.spec.whatwg.org/multipage/scripting.html#restri...