highlight.js icon indicating copy to clipboard operation
highlight.js copied to clipboard

(css) Line breaks disappear

Open Vanessa219 opened this issue 1 year ago • 2 comments
trafficstars

Describe the issue Line breaks disappear

Which language seems to have the issue? css

Are you using highlight or highlightAuto?

hljs.highlight

Sample Code to Reproduce

hljs.highlight(`[\n1`,
          {
            language:"css",
            ignoreIllegals: true
          }
        ).value

QQ_1724903357711

Expected behavior

Line breaks do not disappear

Vanessa219 avatar Aug 29 '24 03:08 Vanessa219

Oh wow, that is one heck of a bug. That shouldn't even be possible.

joshgoebel avatar Aug 29 '24 04:08 joshgoebel

image

TCOTC avatar Aug 29 '24 04:08 TCOTC