# HG changeset patch # User Mads Kiilerich # Date 1420502076 -3600 # Node ID cad46e2a193113347101d5bf81122478647e118c # Parent 725c345e16fe0202e40c75978f1b46e1f46d3bb0 diffs: show CR (\r) in diffs diff -r 725c345e16fe -r cad46e2a1931 kallithea/lib/diffs.py --- 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'()(>|<|&|\t| |\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 '\t' if groups[4]: + return '' + if groups[5]: return ' ' assert False diff -r 725c345e16fe -r cad46e2a1931 kallithea/public/css/style.css --- 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);