aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2011-08-18 12:16:39 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2011-08-18 12:16:39 -0700
commitf9ae93d85464070eea5a7b0dc037be037b602acb (patch)
tree51323722ca92276106129e9062b5c66a4d0582ee /src/Text/Pandoc
parent15eb713e5d8aaad46e4defe1513a73bebed8bcf5 (diff)
downloadpandoc-f9ae93d85464070eea5a7b0dc037be037b602acb.tar.gz
ConTeXt: Escape # in link URLs.
Partially addresses #291.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/ConTeXt.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs
index 763f77d7c..a64b15b58 100644
--- a/src/Text/Pandoc/Writers/ConTeXt.hs
+++ b/src/Text/Pandoc/Writers/ConTeXt.hs
@@ -279,7 +279,8 @@ inlineToConTeXt (Link txt (src, _)) = do
put $ st {stNextRef = next + 1}
let ref = show next
label <- inlineListToConTeXt txt
- return $ "\\useURL" <> brackets (text ref) <> brackets (text src) <>
+ return $ "\\useURL" <> brackets (text ref) <>
+ brackets (text $ escapeStringUsing [('#',"\\#")] src) <>
brackets empty <> brackets label <>
"\\from" <> brackets (text ref)
inlineToConTeXt (Image _ (src, _)) = do