Changeset - cad46e2a1931
[Not reviewed]
default
0 2 0
Mads Kiilerich - 11 years ago 2015-01-06 00:54:36
madski@unity3d.com
diffs: show CR (\r) in diffs
2 files changed with 9 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/diffs.py
Show inline comments
 
@@ -193,13 +193,13 @@ class DiffProcessor(object):
 
        (?:^\+\+\+[ ](b/(?P<b_file>.+?)|/dev/null)\t?(?:\n|$))?
 
    """, re.VERBOSE | re.MULTILINE)
 

	
 
    #used for inline highlighter word split
 
    _token_re = re.compile(r'()(&gt;|&lt;|&amp;|<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):
 
        """
 
        :param diff:   a text in diff format
 
        :param vcs: type of version controll hg or git
 
@@ -261,12 +261,14 @@ class DiffProcessor(object):
 
                return '&lt;'
 
            if groups[2]:
 
                return '&gt;'
 
            if groups[3]:
 
                return '<u>\t</u>'
 
            if groups[4]:
 
                return '<u class="cr"></u>'
 
            if groups[5]:
 
                return ' <i></i>'
 
            assert False
 

	
 
        return self._escape_re.sub(substitute, safe_unicode(string))
 

	
 
    def _line_counter(self, l):
kallithea/public/css/style.css
Show inline comments
 
@@ -4853,12 +4853,18 @@ table.code-difftable .del del {
 
table.code-highlighttable div.code-highlight pre u:before,
 
table.code-difftable td.code pre u:before {
 
    content: "\21a6";
 
    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);
 
}
 
table.code-highlighttable div.code-highlight pre i,
 
table.code-difftable td.code pre i {
0 comments (0 inline, 0 general)