speed-highlight / core

A lightweight syntax highlighter written in JavaScript
https://speed-highlight.github.io/core/examples/
Creative Commons Zero v1.0 Universal
268 stars 15 forks source link

[BUG] Online demo seems to be broken #16

Closed bebraw closed 2 years ago

bebraw commented 2 years ago

Information

I tested both on Chromium 92 and Safari 15.1.

Description

https://matubu.github.io/speed_highlight_js/examples/ seems to be broken. The page is giving

TypeError: Cannot read property 'sub' of undefined
    at tokenize (index.js:36)
    at highlightText (index.js:89)
    at highlightElement (index.js:108)
    at (index):95

Maybe some recent change broke it?

Example

See above.

Expected behavior

I would expect the demo to work.

matubu commented 2 years ago

Should be fix now, thank for reporting