Skip to content
Snippets Groups Projects
Commit 9d5b0ccb authored by Matthew Brett's avatar Matthew Brett
Browse files

Fix dollar escapes at beginning of line

If the escaped dollar is at the beginning of the line, it does not get
replaced with the previous code, because it requires a preceding space.
parent d2112330
No related branches found
No related tags found
No related merge requests found
...@@ -84,6 +84,9 @@ def _clean_lines(lines, filepath): ...@@ -84,6 +84,9 @@ def _clean_lines(lines, filepath):
for char in inline_replace_chars: for char in inline_replace_chars:
line = line.replace('\\{}'.format(char), '\\\\{}'.format(char)) line = line.replace('\\{}'.format(char), '\\\\{}'.format(char))
line = line.replace(' \\$', ' \\\\$') line = line.replace(' \\$', ' \\\\$')
# Escaped dollar could be at beginning of line
if line.startswith('\\$'):
line = '\\' + line
lines[ii] = line lines[ii] = line
return lines return lines
......
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