Added ellipsis substitutions to the smarten punctuation option

This commit is contained in:
ldolse 2010-12-13 16:19:50 -05:00
parent bb5a05a792
commit 13dbd42f35

View File

@ -554,5 +554,8 @@ class HTMLPreProcessor(object):
html = smartyPants(html)
html = html.replace(start, '<!--')
html = html.replace(stop, '-->')
# convert ellipsis to entities to prevent unwrapping
html = re.sub('(?u)(?<=\w)(\.\s?){3}', '&hellip;', html)
html = re.sub('(?u)(?<=\w)\s(\.\s?){3}', '&nbsp;&hellip;', html)
return substitute_entites(html)