From 0647ea64839df5ceecf3a71f672f05a589fd1409 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 7 Jun 2019 11:14:40 -0400 Subject: Move ANSI stripping from filters to Go --- contrib/hldiff.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'contrib/hldiff.py') diff --git a/contrib/hldiff.py b/contrib/hldiff.py index 5f660fd..f3cfd20 100755 --- a/contrib/hldiff.py +++ b/contrib/hldiff.py @@ -3,13 +3,11 @@ from colorama import Fore, Style import sys import re -ansi_escape = re.compile(r'\x1B\[[0-?]*[ -/]*[@-~]') stat_re = re.compile(r'(| \d+ )(\+*)(\-*)') lines_re = re.compile(r'@@ (-\d+,\d+ \+\d+,\d+) @@') sys.stdin.reconfigure(encoding='utf-8', errors='ignore') patch = sys.stdin.read().replace("\r\n", "\n") -patch = ansi_escape.sub('', patch) hit_diff = False for line in patch.split("\n"): -- cgit v1.2.3