git.iko.soy/typeable/pandoc
on master help sign in
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.

commit77125ea68c4c59285a02275f592eb5d41dd3e840 authorJohn MacFarlane <fiddlosopher@gmail.com> dateWed 25 Apr 2012, 19:23 (14 years ago) parent2141e82
1 file changed+2−1
src/Text/Pandoc/Writers/Texinfo.hs+2−1
src/Text/Pandoc/Writers/Texinfo.hs+2−1
@@ -344,7 +344,8 @@ inlineListToTexinfo lst = mapM inlineToTexinfo lst >>= return . hcat
344344-- | Convert list of inline elements to Texinfo acceptable for a node name.
345345inlineListForNode :: [Inline] -- ^ Inlines to convert
346346 -> State WriterState Doc
347−inlineListForNode = return . text . filter (not . disallowedInNode) . stringify
347+inlineListForNode = return . text . stringToTexinfo .
348+ filter (not . disallowedInNode) . stringify
348349
349350-- periods, commas, colons, and parentheses are disallowed in node names
350351disallowedInNode :: Char -> Bool