LaTeX writer: Don't escape underscore in labels.
Previously they were escaped as ux5f.
Closes #2921.
commit7be30a40f1d3c8a2441d618e3d2a0981a63f8846
authorJohn MacFarlane <jgm@berkeley.edu>
dateTue 17 May 2016, 09:18 (10 years ago)
parentad669e4
src/Text/Pandoc/Writers/LaTeX.hs+1−1
@@ -310,7 +310,7 @@ toLabel z = go `fmap` stringToLaTeX URLString z
310310 where go [] = ""
311311 go (x:xs)
312312 | (isLetter x || isDigit x) && isAscii x = x:go xs
313− | elem x ("-+=:;." :: String) = x:go xs
313+ | elem x ("_-+=:;." :: String) = x:go xs
314314 | otherwise = "ux" ++ printf "%x" (ord x) ++ go xs
315315
316316-- | Puts contents into LaTeX command.