highlightjs / highlight.js

JavaScript syntax highlighter with language auto-detection and zero dependencies.
https://highlightjs.org/
BSD 3-Clause "New" or "Revised" License
23.31k stars 3.52k forks source link

(lisp) stop coloring when «'(*» is found #3978

Open texcoffier opened 5 months ago

texcoffier commented 5 months ago

Describe the issue/behavior that seems buggy

When an expression starts with «'(*» the coloring stops for the following lines until a «*» is found.

Sample Code or Instructions to Reproduce

(+ 6 7)   ; colored
'(* 6 7)  ; not colored
(+ 6 7)   ; not colored
(+ 6 7)   ; not colored
'(* 6 7)  ; 6 7 colored, star restarts coloring

(+ 6 7)   ; colored
'(* 6 7)  ; not colored
(+ 6 7)   ; not colored
(+ 6 7)   ; not colored
(* 6 7)   ; 6 7 colored, star restarts coloring

(* 6 7)   ; colored
'(* 6 7)  ; not colored
(+ 6 7)   ; not colored
(+ 6 7)   ; not colored
(+ *)     ; not colored, star restarts coloring

(* 6 7)   ; colored
'(* 6 7)  ; not colored
(+ 6 7)   ; not colored, * in comment restart coloring but not immediatly
(+ 6 7)   ; 6 7 colored
joshgoebel commented 4 months ago

What should it look like? Github isn't helping since it doesn't seem to color the operators...

texcoffier commented 4 months ago

All the «+», «6» and «7» should be colored.

It is as «'(» was eating all the characters until a «» was found.