cue icon indicating copy to clipboard operation
cue copied to clipboard

cuelang.org: broken CUE syntax highlighting

Open jpluscplusm opened this issue 1 year ago • 5 comments
trafficstars

What page were you looking at?

https://cuelang.org/examples/cue/broken-highlighting/

What version of the site were you looking at?

https://github.com/cue-lang/cuelang.org/commit/d413e72e6437ff5569c0471398c32ce8dbf8917a

What did you do?

I published the linked page to the /examples hierarchy of the site.

What did you expect?

All CUE to be highlighted nicely.

What did you see instead?

Some CUE wasn't highlighted nicely.

jpluscplusm avatar Mar 21 '24 12:03 jpluscplusm

Most recent rendered page: https://cl-1185745-2--cue-cls.netlify.app/examples/currently-broken-highlighting/

jpluscplusm avatar Mar 21 '24 12:03 jpluscplusm

Most recent rendered page: https://cl-1185745-5--cue-cls.netlify.app/examples/currently-broken-highlighting/

jpluscplusm avatar Apr 05 '24 17:04 jpluscplusm

Most recent rendered page: : https://cl-1185745-6--cue-cls.netlify.app/examples/currently-broken-highlighting/

jpluscplusm avatar Jun 11 '24 14:06 jpluscplusm

Most recently rendered page: https://cl-1185745-7--cue-cls.netlify.app/examples/currently-broken-highlighting/

jpluscplusm avatar Jun 19 '24 10:06 jpluscplusm

Most recently rendered page: https://cl-1185745-8--cue-cls.netlify.app/examples/currently-broken-highlighting/

jpluscplusm avatar Jul 12 '24 12:07 jpluscplusm

FWIW I did not find this issue when filing https://github.com/cue-lang/cue/issues/3991 because of the lack of keywords, so: one of the issues here relates to empty comments being rendered as if they weren't comments.

Image

mvdan avatar Jul 17 '25 12:07 mvdan

FWIW I did not find this issue when filing #3991 because of the lack of keywords

Good point. Here are the current set of code comments I wrote on https://cuelang.org/examples/cue/broken-highlighting/ so they can be found in GitHub search:

// Comment markers without a trailing comment render wierdly.
// This will strike any guides where we import JSON Schema documents.

// Some types aren't highlighted the same as others

// Lots of non-ASCII characters are flagged as errors.
// Greek upper and lowercase:
// German sharp S

// Quotes inside other string forms break out of string highlighting
// Modified escape delimiters interact poorly with quotes inside strings

// Valid double-double-quotes forces the rest of the file to be rendered as if
// it were inside quotes.

jpluscplusm avatar Jul 17 '25 12:07 jpluscplusm