git @ Cat's Eye Technologies Feedmark / ced667e
Remove more punctuation when creating links. Chris Pressey 7 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
99 if 'link-to-anchors-on' not in section.document.properties:
1010 return None
1111
12 title = re.sub(r"[':,]", '', section.title)
12 title = re.sub(r"[':,.!]", '', section.title)
1313 anchor = (title.replace(u' ', u'-').lower()).encode('utf-8')
1414 return '{}#{}'.format(section.document.properties['link-to-anchors-on'], quote_plus(anchor))
1515