From 77125ea68c4c59285a02275f592eb5d41dd3e840 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 25 Apr 2012 19:23:01 -0700 Subject: 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. --- src/Text/Pandoc/Writers/Texinfo.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3