mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-15 03:16:44 +02:00
When we want to inject a CSS counter for a line, we need to be sure to
handle if we had previously opened a styled span for the current source
substring. For example, if we see a new line in the middle of a comment,
we will have previously opened the following tag:
<span class="comment">
So when injecting a new line and the <span class="line"> element (for
CSS counters), we need to close the previous span and insert a newly
opened tag to continue using the style.
(cherry picked from commit f1395a2c3859fce1daddb385582433c072ebf052)
4.1 KiB
4.1 KiB