summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-05-17 09:18:52 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2016-05-17 09:18:52 -0700
commit7be30a40f1d3c8a2441d618e3d2a0981a63f8846 (patch)
treea39e8b679cdf51db407ec57fe82d974b2b62b956 /src/Text/Pandoc
parentad669e486e3f6920be49adbeeae10ca6f66ff256 (diff)
LaTeX writer: Don't escape underscore in labels.
Previously they were escaped as ux5f. Closes #2921.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs2
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.