rouge
rouge copied to clipboard
JSX and TSX lexers treat custom HTML elements as invalid syntax
Name of the lexer jsx and tsx
Code sample
<my-custom-element foo="bar">
Hello world
</my-custom-element>
https://rouge.jneen.net/v4.3.0/tsx/Y29uc3QgSGVsbG9Xb3JsZCA9ICgpID0-IHsKICByZXR1cm4gKAogICAgPG15LWN1c3RvbS1lbGVtZW50IGZvbz0iYmFyIj4KICAgICAgSGVsbG8gd29ybGQKICAgIDwvbXktY3VzdG9tLWVsZW1lbnQ-CiAgKTsKfQo
Additional context The hyphen in custom elements are treated as invalid syntax in JSX/TSX lexers. Custom HTML elements require a hyphen.
Surprisingly, the html lexer does not have this issue.