diff --git a/bin/build.py b/bin/build.py index c66a48e..4e3748e 100755 --- a/bin/build.py +++ b/bin/build.py @@ -243,10 +243,12 @@ def hyphenate(node): pass # add none breaking spaces - nbspzr = ['"', '»', '«', '\.', '\!', '\?', ':', ';'] - for char in nbspzr: - # print(char) + nbspzr_before = ['"', '»', '\!', '\?', ':', ';'] + for char in nbspzr_before: nodestr = re.sub(r'('+char+')\s(\w)', r'\1 \2', nodestr) + + nbspzr_after = ['"', '«'] + for char in nbspzr_after: nodestr = re.sub(r'(\w)\s('+char+')', r'\1 \2', nodestr) # print(nodestr)