peggyjs / peggy

Peggy: Parser generator for JavaScript
https://peggyjs.org/
MIT License
941 stars 65 forks source link

Playground syntax highlight grammar breaks when using template literals #423

Closed KrofDrakula closed 1 year ago

KrofDrakula commented 1 year ago

Was playing around with the online playground and noticed that template strings break highlighting when using interpolation:

image

The file still parses correctly but the highlighting is broken from that point onwards.

hildjj commented 1 year ago

Good catch. I'm going to mark this one as "help wanted", and see if someone who knows how the highlighting works can send a PR.

KrofDrakula commented 1 year ago

Might be related to #296.

reverofevil commented 1 year ago

Yeah, it's been a problem of CodeMirror's JS grammar for ages. Really should switch from CM to something else.

hildjj commented 1 year ago

Let's talk about options on #296. I agree that's the correct, lowest-effort approach to solving this.

Going to close this as a dup.