Closed d0c-s4vage closed 1 year ago
This PR changes the default html rendering to use spans with padding set to a specific number of monospace character widths instead of for all spaces. This makes the text of the html (especially code snippets) easier to copy+paste.
Markdown like this:
This is markdown ``` code block ```
was originally rendered into this:
<span style="color: #ffffff; background-color: #000000">Test</span> ... <span style="color: #ffffff; background-color: #000000"> ... <span style="color: #f8f8f2; background-color: #272822"> code block</span><span style="background-color: #272822"> ...
but is now rendered into this:
</span><span style="color: #ffffff; background-color: #000000">Test</span><span style='padding-left: 76ch'></span> </span><span style="color: #ffffff; background-color: #000000"><span style='padding-left: 80ch'></span></span> </span><span style="color: #f8f8f2; background-color: #272822"> code block</span><span style="background-color: #272822"><span style='padding-left: 68ch'></span></span>
Fixes #212
This PR changes the default html rendering to use spans with padding set to a specific number of monospace character widths instead of
for all spaces. This makes the text of the html (especially code snippets) easier to copy+paste.Examples
Markdown like this:
was originally rendered into this:
but is now rendered into this:
Fixes #212