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.
This commit is contained in:
John MacFarlane 2012-04-25 19:23:01 -07:00
parent 2141e8243e
commit 77125ea68c

View file

@ -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