aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-09-15 20:42:24 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-09-15 20:43:36 -0700
commitd9e34ce34db194f82a0910016174d7d88c2f6eeb (patch)
tree04b6ca631d20561440ecbc6758959223039e2f46 /src
parentfc4ae15337ec461f2dbc0eed4701598e012a2151 (diff)
downloadpandoc-d9e34ce34db194f82a0910016174d7d88c2f6eeb.tar.gz
LaTeX writer: don't escape _ in url.
Diffstat (limited to 'src')
-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 12ffecd98..1967e40dc 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -189,7 +189,7 @@ stringToLaTeX isUrl (x:xs) = do
'$' -> "\\$" ++ rest
'%' -> "\\%" ++ rest
'&' -> "\\&" ++ rest
- '_' -> "\\_" ++ rest
+ '_' | not isUrl -> "\\_" ++ rest
'#' -> "\\#" ++ rest
'-' -> case xs of -- prevent adjacent hyphens from forming ligatures
('-':_) -> "-{}" ++ rest