# HG changeset patch # User Mads Kiilerich # Date 2015-01-06 00:54:36 # Node ID cad46e2a193113347101d5bf81122478647e118c # Parent 725c345e16fe0202e40c75978f1b46e1f46d3bb0 diffs: show CR (\r) in diffs diff --git a/kallithea/lib/diffs.py b/kallithea/lib/diffs.py --- a/kallithea/lib/diffs.py +++ b/kallithea/lib/diffs.py @@ -196,7 +196,7 @@ class DiffProcessor(object): #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 @@ class DiffProcessor(object): if groups[3]: return '\t' if groups[4]: + return '' + if groups[5]: return ' ' assert False diff --git a/kallithea/public/css/style.css b/kallithea/public/css/style.css --- a/kallithea/public/css/style.css +++ b/kallithea/public/css/style.css @@ -4856,6 +4856,12 @@ table.code-difftable td.code pre u:befor 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);