hgext/highlight/highlight.py
changeset 23613 7b8ff3fd11d3
parent 19169 bcdfb6078b9f
child 25867 a74e9806d17d
--- a/hgext/highlight/highlight.py	Thu Dec 18 21:53:55 2014 +0100
+++ b/hgext/highlight/highlight.py	Wed Dec 17 13:25:24 2014 -0600
@@ -32,6 +32,11 @@
     if util.binary(text):
         return
 
+    # str.splitlines() != unicode.splitlines() because "reasons"
+    for c in "\x0c\x1c\x1d\x1e":
+        if c in text:
+            text = text.replace(c, '')
+
     # Pygments is best used with Unicode strings:
     # <http://pygments.org/docs/unicode/>
     text = text.decode(encoding.encoding, 'replace')