You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is currently hurting our ability to Syntax highlight SuperHTML templates correctly. They look much better in an editor than they do in a rendered code block.
This is the current code that applies syntax highlighting:
zine/zine/src/highlight.zig
Lines 78 to 104 in 4b3efd1
This code runs the
highlights.scm
query from the tree sitter parser of each language and decorates the output with appropriateclass
attributes.This algorithm is a bit too simplistic because it's unable to render overlapping matches, which means that some highlighting information is lost.
A more correct solution would involve buffering changes in order to create a final set of span elements that properly represents all matches.
The text was updated successfully, but these errors were encountered: