diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-03-19 21:55:38 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-03-19 21:55:38 +0100 |
commit | 34412cf57c904f5729f96553ed9481869dde7358 (patch) | |
tree | 989ccd332bf130c9b5f32dbd1753a468dff05831 /src/Text/Pandoc/Readers | |
parent | fff3489bf3665b5f7d82e5404b566f650c04d364 (diff) | |
download | pandoc-34412cf57c904f5729f96553ed9481869dde7358.tar.gz |
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.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 3 |
1 files changed, 2 insertions, 1 deletions
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 |