diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs index 1fd984a6d..a2f2739a0 100644 --- a/src/Text/Pandoc/Writers/RST.hs +++ b/src/Text/Pandoc/Writers/RST.hs @@ -273,7 +273,8 @@ blockToRST (CodeBlock (_,classes,kvs) str) = do then return $ prefixed "> " (text str) $$ blankline else return $ (case [c | c <- classes, - c `notElem` ["sourceCode","literate","numberLines"]] of + c `notElem` ["sourceCode","literate","numberLines", + "number-lines","example"]] of [] -> "::" (lang:_) -> (".. code:: " <> text lang) $$ numberlines) $+$ nest 3 (text str) $$ blankline diff --git a/test/command/4748.md b/test/command/4748.md new file mode 100644 index 000000000..1de0fa9ed --- /dev/null +++ b/test/command/4748.md @@ -0,0 +1,16 @@ +``` +% pandoc -f org -t rst +Before example block. +#+begin_example +This is in an example block. +#+end_example +After example block. +^D +Before example block. + +:: + + This is in an example block. + +After example block. +```