aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Texinfo.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-04-25 19:23:01 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-04-25 19:23:01 -0700
commit77125ea68c4c59285a02275f592eb5d41dd3e840 (patch)
treee4f67efbc9a72e257d48c4d7749879ac8084ff3f /src/Text/Pandoc/Writers/Texinfo.hs
parent2141e8243e5ab6058400cf87967080d8087ee345 (diff)
downloadpandoc-77125ea68c4c59285a02275f592eb5d41dd3e840.tar.gz
Texinfo writer: Escape special characters in node titles.
This fixes a problem pointed out by Joost Kremers. Pandoc used to escape an '@' in a chapter title, but not in the corresponding node title, leading to invalid texinfo.
Diffstat (limited to 'src/Text/Pandoc/Writers/Texinfo.hs')
-rw-r--r--src/Text/Pandoc/Writers/Texinfo.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Texinfo.hs b/src/Text/Pandoc/Writers/Texinfo.hs
index 45e4c439f..6bb782899 100644
--- a/src/Text/Pandoc/Writers/Texinfo.hs
+++ b/src/Text/Pandoc/Writers/Texinfo.hs
@@ -344,7 +344,8 @@ inlineListToTexinfo lst = mapM inlineToTexinfo lst >>= return . hcat
-- | Convert list of inline elements to Texinfo acceptable for a node name.
inlineListForNode :: [Inline] -- ^ Inlines to convert
-> State WriterState Doc
-inlineListForNode = return . text . filter (not . disallowedInNode) . stringify
+inlineListForNode = return . text . stringToTexinfo .
+ filter (not . disallowedInNode) . stringify
-- periods, commas, colons, and parentheses are disallowed in node names
disallowedInNode :: Char -> Bool