fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Editor: fix
[redakcja.git]
/
apps
/
wiki
/
nice_diff.py
diff --git
a/apps/wiki/nice_diff.py
b/apps/wiki/nice_diff.py
old mode 100755
(executable)
new mode 100644
(file)
index
355600b
..
b228fad
--- a/
apps/wiki/nice_diff.py
+++ b/
apps/wiki/nice_diff.py
@@
-17,12
+17,15
@@
NAMES = {'+': 'added', '-': 'removed', '^': 'changed'}
def diff_replace(match):
return """<span class="diff_mark diff_mark_%s">""" % NAMES[match.group(1)]
def diff_replace(match):
return """<span class="diff_mark diff_mark_%s">""" % NAMES[match.group(1)]
+
def filter_line(line):
return DIFF_RE.sub(diff_replace, html_escape(line)).replace('\x01', '</span>')
def filter_line(line):
return DIFF_RE.sub(diff_replace, html_escape(line)).replace('\x01', '</span>')
+
def format_changeset(a, b, change):
return (a[0], filter_line(a[1]), b[0], filter_line(b[1]), change)
def format_changeset(a, b, change):
return (a[0], filter_line(a[1]), b[0], filter_line(b[1]), change)
+
def html_diff_table(la, lb, context=None):
all_changes = difflib._mdiff(la, lb)
def html_diff_table(la, lb, context=None):
all_changes = difflib._mdiff(la, lb)