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.
This commit is contained in:
John MacFarlane 2017-03-19 21:55:38 +01:00
parent fff3489bf3
commit 34412cf57c

View file

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