From 34412cf57c904f5729f96553ed9481869dde7358 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 19 Mar 2017 21:55:38 +0100 Subject: RST reader: recurse into bodies of unknown directives. In most cases it's better to preserve the content than to emit it. This isn't guaranteed to have good results; it will fail spectacularly for unknown raw or verbatim directives. See #3432. --- src/Text/Pandoc/Readers/RST.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index f27b02f25..7564998ff 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -755,7 +755,8 @@ directive' = do other -> do pos <- getPosition logMessage $ SkippedContent (".. " ++ other) pos - return mempty + bod <- parseFromString parseBlocks $ top ++ "\n\n" ++ body' + return $ B.divWith ("",[other],[]) bod tableDirective :: PandocMonad m => String -> [(String, String)] -> String -> RSTParser m Blocks -- cgit v1.2.3