Closed paladox closed 4 months ago
Oh... it appears to be due to the use of //
within ${(e: MouseEvent) => {
Ah because of '
in don't
.
Seems a comment isn't properly highlighted as a comment within ${(e: MouseEvent) => {
. As you can see if you do it in private renderHeaderTitle() {
, it's grey. But within ${(e: MouseEvent) => {
it's red. Highlighting breaks when using a '
.
We don't really support JSX/TSX very well - it's quite hard without a real parser. Closing this as a duplicate of #2998.
Describe the issue
Which language seems to have the issue? Typescript
Are you using
highlight
orhighlightAuto
? highlightSample Code to Reproduce You can reproduce with the following on https://highlightjs.org/demo
Expected behavior Highlighting not to break after
${(e: MouseEvent) => {
Additional context Happens on https://gerrit-review.googlesource.com/c/gerrit/+/410005/2/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts