mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
Use Zero Width Space for empty lines.
https://en.wikipedia.org/wiki/Zero-width_space
This commit is contained in:
parent
91560b567c
commit
6fa4e6d7a6
2 changed files with 2 additions and 2 deletions
|
@ -150,7 +150,7 @@ def pygmentize(code_string, lexer_name=LEXER_DEFAULT):
|
||||||
# Plain code is not highlighted, but we wrap with with regular
|
# Plain code is not highlighted, but we wrap with with regular
|
||||||
# Pygments syntax to keep the frontend aligned.
|
# Pygments syntax to keep the frontend aligned.
|
||||||
if lexer_name == PLAIN_CODE:
|
if lexer_name == PLAIN_CODE:
|
||||||
return '\n'.join(['<span class="plain">{}</span>'.format(escape(l))
|
return '\n'.join(['<span class="plain">{}</span>'.format(escape(l) or '​')
|
||||||
for l in code_string.splitlines()])
|
for l in code_string.splitlines()])
|
||||||
|
|
||||||
# Everything else is handled by Pygments.
|
# Everything else is handled by Pygments.
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
<ol>{% for line in snippet.highlight_lines %}<li id="l{{ forloop.counter }}">{{ line|safe|default:" " }}</li>{% endfor %}</ol>
|
<ol>{% for line in snippet.highlight_lines %}<li id="l{{ forloop.counter }}">{{ line|safe|default:"​" }}</li>{% endfor %}</ol>
|
||||||
|
|
Loading…
Reference in a new issue