Previously, repeated consecutive line breaks got eaten by this syntax highlighter plugin.
Consider this imaginary code snippet:
```
foo
bar
```
The empty line got turned into an empty <div class="highlight-line"></div>, which is a form of data loss — the actual line break is no longer part of the resulting HTML. This caused it to render differently, too.
This patch ensures newlines are preserved by explicitly inserting them in the resulting HTML when neededconsistently.
Previously, repeated consecutive line breaks got eaten by this syntax highlighter plugin.
Consider this imaginary code snippet:
The empty line got turned into an empty
<div class="highlight-line"></div>
, which is a form of data loss — the actual line break is no longer part of the resulting HTML. This caused it to render differently, too.This patch ensures newlines are preserved by explicitly inserting them in the resulting HTML
when neededconsistently.