Mercurial > kallithea
changeset 4723:cad46e2a1931
diffs: show CR (\r) in diffs
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 06 Jan 2015 00:54:36 +0100 |
parents | 725c345e16fe |
children | 2a6c61a2e84e |
files | kallithea/lib/diffs.py kallithea/public/css/style.css |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/diffs.py Tue Jan 06 00:54:35 2015 +0100 +++ b/kallithea/lib/diffs.py Tue Jan 06 00:54:36 2015 +0100 @@ -196,7 +196,7 @@ #used for inline highlighter word split _token_re = re.compile(r'()(>|<|&|<u>\t</u>| <i></i>|\W+?)') - _escape_re = re.compile(r'(&)|(<)|(>)|(\t)|(?<=.)( \n| $)') + _escape_re = re.compile(r'(&)|(<)|(>)|(\t)|(\r)|(?<=.)( \n| $)') def __init__(self, diff, vcs='hg', format='gitdiff', diff_limit=None): @@ -264,6 +264,8 @@ if groups[3]: return '<u>\t</u>' if groups[4]: + return '<u class="cr"></u>' + if groups[5]: return ' <i></i>' assert False
--- a/kallithea/public/css/style.css Tue Jan 06 00:54:35 2015 +0100 +++ b/kallithea/public/css/style.css Tue Jan 06 00:54:36 2015 +0100 @@ -4856,6 +4856,12 @@ display: inline-block; width: 0; } +table.code-highlighttable div.code-highlight pre u.cr:before, +table.code-difftable td.code pre u.cr:before { + content: "\21a4"; + display: inline-block; + color: rgba(0,0,0,0.5); +} table.code-highlighttable div.code-highlight pre u, table.code-difftable td.code pre u { color: rgba(0,0,0,0.15);