Skip to content

Commit

Permalink
RST reader: recurse into bodies of unknown directives.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jgm committed Mar 19, 2017
1 parent fff3489 commit 34412cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Text/Pandoc/Readers/RST.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 34412cf

Please sign in to comment.