Skip to content
Snippets Groups Projects
Commit 5863f115 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

correctly escape 'a_ ' text, which is not a reference unlike 'a_b '

parent 75d259f5
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,8 @@ class RSTMarkup(Markup):
text = text.replace('*', '\\*')
text = text.replace('^', '\\^')
text = text.replace('|', '\\|')
text = re.sub(r'([^"])_', r'\1\\_', text)
text = re.sub(r'([^"])_([ \t\n\r\f])', r'\1\\\\_\2', text)
text = re.sub(r'([^"])_([^ \t\n\r\f])', r'\1\\_\2', text)
return text
def unescape_rst_chars(self, text):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment