From 0148280a225aec7c780fbb48cad6aef1ea520765 Mon Sep 17 00:00:00 2001 From: Ilya Shakhat Date: Wed, 16 Oct 2013 19:21:40 +0400 Subject: [PATCH] Split long sequences of '-', '+', '=' by zero-width space Change-Id: I85d39b0da0f76c9ceee59fbbb284798bc29146d6 --- stackalytics/processor/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stackalytics/processor/utils.py b/stackalytics/processor/utils.py index 27913c9c4..6cd125171 100644 --- a/stackalytics/processor/utils.py +++ b/stackalytics/processor/utils.py @@ -108,7 +108,7 @@ def unwrap_text(text): def format_text(s): s = cgi.escape(re.sub(re.compile('\n{2,}', flags=re.MULTILINE), '\n', s)) - s = re.sub(r'([/\/]+)', r'\1​', s) + s = re.sub(r'([/\/\*=]{1,2}|--|\+\+)', r'\1​', s) return s