diff --git a/src/solutions/templatetags/highlight.py b/src/solutions/templatetags/highlight.py index faa61997..33d09870 100755 --- a/src/solutions/templatetags/highlight.py +++ b/src/solutions/templatetags/highlight.py @@ -35,10 +35,10 @@ def colorize_table(value,arg=None): except ClassNotFound: return mark_safe("
%s
" % escape(value)) -rx_diff_pm = re.compile('^(?P\d*
)?(?P()?(?P\+|-).*?)(?P
)?$') -rx_diff_questionmark = re.compile('(?P()?\?.*$)') -rx_tag = re.compile('^(<[^<]*>)+') -rx_char = re.compile('^(&\w+;|.)') +rx_diff_pm = re.compile(r'^(?P\d*
)?(?P()?(?P\+|-).*?)(?P
)?$') +rx_diff_questionmark = re.compile(r'(?P()?\?.*$)') +rx_tag = re.compile(r'^(<[^<]*>)+') +rx_char = re.compile(r'^(&\w+;|.)') @register.filter def highlight_diff(value): "enclose highlighted lines beginning with an +-? in a span"