summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/SyntaxHighlighter
AgeCommit message (Collapse)Author
2021-10-23LibWeb: Syntax-highlight CSS within HTML :^)Sam Atkins
2021-07-17LibWeb: Hide implementation details of HTMLToken attribute listMax Wipfli
Previously, HTMLToken would expose the Vector<Attribute> directly to its users. In preparation for a future change, all users now use implementation-agnostic APIs which do not expose the Vector directly.
2021-06-12AK: Rename Vector::append(Vector) => Vector::extend(Vector)Andreas Kling
Let's make it a bit more clear when we're appending the elements from one vector to the end of another vector.
2021-06-07LibWeb+LibSyntax: Implement nested syntax highlightersAli Mohammad Pur
And use them to highlight javascript in HTML source. This commit also changes how TextDocumentSpan::data is interpreted, as it used to be an opaque pointer, but everyone stuffed an enum value inside it, which made the values not unique to each highlighter; that field is now a u64 serial id. The syntax highlighters don't need to change their ways of stuffing token types into that field, but a highlighter that calls another nested highlighter needs to register the nested types for use with token pairs.
2021-06-05LibWeb: Fix off-by-one error in SyntaxHighlighterMax Wipfli
This changes the HTML SyntaxHighlighter to conform to the now-fixed rendering of syntax highlighting spans in GUI::TextEditor. It also avoids emitting tokens if they have a zero or negative length. This fixes a bug where single-character tokens were not highlighted properly.
2021-06-05LibWeb: Add debugging statements in SyntaxHighlighterMax Wipfli
This also changes SyntaxHighlighter.{h,cpp} to use east const style.
2021-05-21LibWeb: Make tag names bold in syntax-highlighted HTML :^)Andreas Kling
2021-05-20LibWeb: Add a super basic HTML syntax highlighterAli Mohammad Pur
This can currently highlight tag names and attribute names/values.