mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
1db243c006
This has no visible effect, but internally it's also highlighting any CSS and JS embedded in the page, which will be made use of later. We'll also be able to use this code for highlighting CSS or JS files directly in the future. It's not a perfect fit - the syntax highlighters give specific styles to their spans, which we then ignore and just use their data integer to figure out which CSS class to give to the span. It feels cleaner to me to produce HTML styled that way, instead of every token having `style="color: ...; font-weight: ...; text-decoration: ...;"` set on it. Most of this new `to_html_string()` code is adapted from Serenity's `TextEditor::paint_event()`, so it should be pretty solid. |
||
---|---|---|
.. | ||
Libraries | ||
Services | ||
Utilities |