Vue: Handle more edge cases#950
Conversation
|
As the original reporter of this bug for Forgejo, the "after" behavior is exactly what I wanted and I hope this gets merged. Thanks! Edit: though I'm not sure why the closing tags for |
- The parsing of `v-` directives expected that this always ended in `">`, however it is possible that there are other attributes after an `v-` directive also it made the assumption that there couldn't be any spaces in the value of the directive. Therefore it could result in incorrect lexing where almost the whole file could be marked as an LiteralString. - Handle `-` in HTML element names. - Explicitely mark `=` as an operator token. - Tests added. - Ref: https://codeberg.org/forgejo/forgejo/issues/2945
v- directives
Fixed by https://github.com/alecthomas/chroma/compare/90531d5c073acb919eeecfbe743ae8c6ef0f0dfa..d33880c230195603aa80484942e268944ebd6e17 also updated the screenshot accordingly. |
|
@alecthomas Thank you for time to review this! Much appreciated. |
|
Thanks for the PR! |
v-directives expected that this always ended in">, however it is possible that there are other attributes after anv-directive also it made the assumption that there couldn't be any spaces in the value of the directive. Therefore it could result in incorrect lexing where almost the whole file could be marked as an LiteralString.-in HTML element names.=as an operator token.Before
After