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/plaintext.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'contrib/plaintext.py') diff --git a/contrib/plaintext.py b/contrib/plaintext.py index 522055b..d46991a 100755 --- a/contrib/plaintext.py +++ b/contrib/plaintext.py @@ -5,7 +5,6 @@ import re # TODO: Wrap text to terminal width? -ansi_escape = re.compile(r'\x1B\[[0-?]*[ -/]*[@-~]') # TODO: I guess this might vary from MUA to MUA. I've definitely seen localized # versions in the wild quote_prefix_re = re.compile(r"On .*, .* wrote:") @@ -13,7 +12,6 @@ quote_re = re.compile(r">+") sys.stdin.reconfigure(encoding='utf-8', errors='ignore') mail = sys.stdin.read().replace("\r\n", "\n") -mail = ansi_escape.sub('', mail) for line in mail.split("\n"): if quote_re.match(line) or quote_prefix_re.match(line): -- cgit v1.2.3