diff options
author | Andy Doan <andy.doan@linaro.org> | 2016-02-16 15:20:00 -0600 |
---|---|---|
committer | Stephen Finucane <stephen.finucane@intel.com> | 2016-02-17 21:18:11 +0000 |
commit | 7591971245aa8d43b21f1f429a223fc0792f2274 (patch) | |
tree | e323c2e4d75eb3dcdc3e279acedbc84245da9cd4 /patchwork | |
parent | 7667078e643e02abc4475742894582d2fd3aab54 (diff) | |
download | patchwork-7591971245aa8d43b21f1f429a223fc0792f2274.tar patchwork-7591971245aa8d43b21f1f429a223fc0792f2274.tar.gz |
templatetags: fix syntax display of CRLF's
Patches that include CRLF's include extra lines in the UI. Rather than
each patch line being:
<span ...>content</span>
Its source will be:
<span ...>content
</span>
Signed-off-by: Andy Doan <andy.doan@linaro.org>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
Diffstat (limited to 'patchwork')
-rw-r--r-- | patchwork/templatetags/syntax.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/patchwork/templatetags/syntax.py b/patchwork/templatetags/syntax.py index 1f7e718..2a4164d 100644 --- a/patchwork/templatetags/syntax.py +++ b/patchwork/templatetags/syntax.py @@ -59,7 +59,7 @@ _span = '<span class="%s">%s</span>' @register.filter def patchsyntax(patch): - content = escape(patch.content) + content = escape(patch.content).replace('\r\n', '\n') for (r, cls) in _patch_span_res: content = r.sub(lambda x: _span % (cls, x.group(0)), content) |