Only modify pound symbols at the start of a word

This commit is contained in:
Mouse Reeve 2022-05-23 16:13:56 -07:00
parent c022debee9
commit e26ba3857c

View file

@ -260,7 +260,7 @@ def _wrapped(text):
def to_markdown(content):
"""catch links and convert to markdown"""
content = format_links(content)
content = content.replace("#", "\\#")
content = re.sub(r"\B#", "\\#", content)
content = markdown(content)
# sanitize resulting html
sanitizer = InputHtmlParser()