diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2011-08-18 12:16:39 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2011-08-18 12:16:39 -0700 |
commit | f9ae93d85464070eea5a7b0dc037be037b602acb (patch) | |
tree | 51323722ca92276106129e9062b5c66a4d0582ee /src/Text/Pandoc | |
parent | 15eb713e5d8aaad46e4defe1513a73bebed8bcf5 (diff) | |
download | pandoc-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.hs | 3 |
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 |