aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/RST.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs
index 0bcffd709..75b249036 100644
--- a/src/Text/Pandoc/Readers/RST.hs
+++ b/src/Text/Pandoc/Readers/RST.hs
@@ -366,7 +366,11 @@ codeBlockBody = try $ B.codeBlock . stripTrailingNewlines <$> indentedBlock
-- specified.
customCodeBlock :: Parser [Char] st Blocks
customCodeBlock = try $ do
- string ".. code-block:: "
+ string ".. "
+ string "code"
+ optional $ string "-block"
+ string "::"
+ skipSpaces
language <- manyTill anyChar newline
blanklines
result <- indentedBlock