diff --git a/bin/build.py b/bin/build.py index 1e620cd..7dd73c5 100755 --- a/bin/build.py +++ b/bin/build.py @@ -245,11 +245,11 @@ def hyphenate(node): # add none breaking spaces nbspzr_before = ['»', '\!', '\?', ':', ';'] for char in nbspzr_before: - nodestr = re.sub(r'(\w)\s('+char+')', r'\1 \2', nodestr) + nodestr = re.sub(r'(\w|>)\s('+char+')', r'\1 \2', nodestr) nbspzr_after = ['«'] for char in nbspzr_after: - nodestr = re.sub(r'('+char+')\s(\w)', r'\1 \2', nodestr) + nodestr = re.sub(r'('+char+')\s(\w|<)', r'\1 \2', nodestr) # print(nodestr) # replace node by hyphenated one