1. Carlos Galdino
  2. pygments-main

Commits

Georg Brandl  committed 7527e46

Closes #755: replace some more active chars for latex.

  • Participants
  • Parent commits 5b45626
  • Branches default

Comments (0)

Files changed (1)

File pygments/formatters/latex.py

View file
  • Ignore whitespace
                 replace('#', r'\%sZsh{}' % commandprefix). \
                 replace('%', r'\%sZpc{}' % commandprefix). \
                 replace('$', r'\%sZdl{}' % commandprefix). \
+                replace('-', r'\%sZhy{}' % commandprefix). \
+                replace("'", r'\%sZsq{}' % commandprefix). \
+                replace('"', r'\%sZdq{}' % commandprefix). \
                 replace('~', r'\%sZti{}' % commandprefix)
 
 
 \def\%(cp)sZsh{\char`\#}
 \def\%(cp)sZpc{\char`\%%}
 \def\%(cp)sZdl{\char`\$}
+\def\%(cp)sZhy{\char`\-}
+\def\%(cp)sZsq{\char`\'}
+\def\%(cp)sZdq{\char`\"}
 \def\%(cp)sZti{\char`\~}
 %% for compatibility with earlier versions
 \def\%(cp)sZat{@}