diff options
author | Raphael Langella <raphael.langella@gmail.com> | 2013-12-12 22:34:43 +0100 |
---|---|---|
committer | Raphael Langella <raphael.langella@gmail.com> | 2013-12-12 23:37:23 +0100 |
commit | 34c18d0b198bbe7b651224e4733a3fbc132be2ce (patch) | |
tree | 356d8e2174c75ed2a45ea69de81caace27c69a2d /crawl-ref/source/util/txc | |
parent | dea2a6613bb7176dfe6cada6f2c538ede36ef3ee (diff) | |
download | crawl-ref-34c18d0b198bbe7b651224e4733a3fbc132be2ce.tar.gz crawl-ref-34c18d0b198bbe7b651224e4733a3fbc132be2ce.zip |
[txc] Don't try to remove whitespaces around punctuation in ja and zh.
Probably I introduced some of them, but I'm afraid an automated fix might
do more harm than it fixes. The script shouldn't mess with whitespaces anymore.
Diffstat (limited to 'crawl-ref/source/util/txc')
-rwxr-xr-x | crawl-ref/source/util/txc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/crawl-ref/source/util/txc b/crawl-ref/source/util/txc index fc8bdbf1ce..7ea0103993 100755 --- a/crawl-ref/source/util/txc +++ b/crawl-ref/source/util/txc @@ -233,7 +233,6 @@ def auto_fix(s, lang): s = auto_fix.re_hyphen.sub(u"\\1—\\2", s) s = auto_fix.re_ns.sub(u" \\1", s) s = auto_fix.re_ns2.sub(u"« ", s) - s = auto_fix.re_east_asian_punctuation.sub(u"\\1", s) if s.find('{{') == -1: # Don't mess with lua strings s = auto_fix.re_ascii_single_quotes.sub(u"‘\\1’", s) @@ -251,7 +250,6 @@ def auto_fix(s, lang): auto_fix.re_hyphen = re.compile("(\s)[-–](\s)") # Replace hyphens by em dashes auto_fix.re_ns = re.compile("\s([!?:;»])") auto_fix.re_ns2 = re.compile(u"«\s") -auto_fix.re_east_asian_punctuation = re.compile(u" *([%s]) *" % east_asian_punctuation) auto_fix.re_ascii_single_quotes = re.compile(u"(?<=\s)'(.*?)'(?=\W)", re.S) auto_fix.re_ascii_double_quotes = re.compile(u'"(.*?)"', re.S) auto_fix.re_english_single_quotes = re.compile(u'‘(.*?)’', re.S) |