parent
a974027efe
commit
32a9da3143
2 changed files with 2 additions and 0 deletions
|
@ -7,6 +7,7 @@ ansi_escape = re.compile(r'\x1B\[[0-?]*[ -/]*[@-~]')
|
||||||
stat_re = re.compile(r'(| \d+ )(\+*)(\-*)')
|
stat_re = re.compile(r'(| \d+ )(\+*)(\-*)')
|
||||||
lines_re = re.compile(r'@@ (-\d+,\d+ \+\d+,\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 = sys.stdin.read().replace("\r\n", "\n")
|
||||||
patch = ansi_escape.sub('', patch)
|
patch = ansi_escape.sub('', patch)
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ ansi_escape = re.compile(r'\x1B\[[0-?]*[ -/]*[@-~]')
|
||||||
quote_prefix_re = re.compile(r"On .*, .* wrote:")
|
quote_prefix_re = re.compile(r"On .*, .* wrote:")
|
||||||
quote_re = re.compile(r">+")
|
quote_re = re.compile(r">+")
|
||||||
|
|
||||||
|
sys.stdin.reconfigure(encoding='utf-8', errors='ignore')
|
||||||
mail = sys.stdin.read().replace("\r\n", "\n")
|
mail = sys.stdin.read().replace("\r\n", "\n")
|
||||||
mail = ansi_escape.sub('', mail)
|
mail = ansi_escape.sub('', mail)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue