+
+ if getattr(builder, 'hyphenator', None) is not None:
+ newt = ''
+ wlist = re.compile(r'\w+|[^\w]', re.UNICODE).findall(text)
+ for w in wlist:
+ newt += builder.hyphenator.inserted(w, u'\u00AD')
+ text = newt
+
+ if builder.orphans:
+ text = re.sub(r'(?<=\s\w)\s+', u'\u00A0', text)