Skip to content

Commit

Permalink
Merge pull request #28 from matthew-brett/initial-dollar-fix
Browse files Browse the repository at this point in the history
Fix dollar escapes at beginning of line
  • Loading branch information
choldgraf authored Oct 20, 2018
2 parents d211233 + 9d5b0cc commit 1b8766b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/generate_textbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ def _clean_lines(lines, filepath):
for char in inline_replace_chars:
line = line.replace('\\{}'.format(char), '\\\\{}'.format(char))
line = line.replace(' \\$', ' \\\\$')
# Escaped dollar could be at beginning of line
if line.startswith('\\$'):
line = '\\' + line
lines[ii] = line
return lines

Expand Down

0 comments on commit 1b8766b

Please sign in to comment.