AvalonEdit icon indicating copy to clipboard operation
AvalonEdit copied to clipboard

incorrect JavaScript syntax highlighting for quotes in arrays

Open cbries opened this issue 3 years ago • 1 comments

Commit: up to the latest master variant (395ef8166870e2c6e1f63a7d97ac22e5e646e790)

Steps to reproduce: (1) load the AvalonEdit solution (2) Build & Run the Sample project ICSharpCode.AvalonEdit.Sample (3) switch to "JavaScript" mode (4) paste the following JavaScript:

const texts = [
  `Hello world`,
  `My 'Comma`,
  `My end of Comma'`, 
  `My "Comma`,
  `My incorrect highlighting " Dingens`,
  `Inside "it seems to work" without issue.`
]

(5) result image

As you can see the quote highlighting is going over two or more lines. The JavaScript code is absolutly valid as I see: image

cbries avatar Mar 17 '22 07:03 cbries

This is likely because AvalonEdit only has syntax highlighting for variants of JS from the stone age. We will gladly accept a PR that fixes this!

siegfriedpammer avatar Mar 17 '22 09:03 siegfriedpammer

Seems to be solved by AvalonEdit v6.3.0.0 and higher:

image

cbries avatar Jun 07 '23 08:06 cbries