diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-05-17 09:18:52 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-05-17 09:18:52 -0700 |
commit | 7be30a40f1d3c8a2441d618e3d2a0981a63f8846 (patch) | |
tree | a39e8b679cdf51db407ec57fe82d974b2b62b956 /src | |
parent | ad669e486e3f6920be49adbeeae10ca6f66ff256 (diff) | |
download | pandoc-7be30a40f1d3c8a2441d618e3d2a0981a63f8846.tar.gz |
LaTeX writer: Don't escape underscore in labels.
Previously they were escaped as ux5f.
Closes #2921.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 9284d18ee..be9fd7ad7 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -310,7 +310,7 @@ toLabel z = go `fmap` stringToLaTeX URLString z where go [] = "" go (x:xs) | (isLetter x || isDigit x) && isAscii x = x:go xs - | elem x ("-+=:;." :: String) = x:go xs + | elem x ("_-+=:;." :: String) = x:go xs | otherwise = "ux" ++ printf "%x" (ord x) ++ go xs -- | Puts contents into LaTeX command. |