Permalink
Browse files

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.
  • Loading branch information...
1 parent 2141e82 commit 77125ea68c4c59285a02275f592eb5d41dd3e840 John MacFarlane committed Apr 26, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 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

0 comments on commit 77125ea

Please sign in to comment.