aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2012-09-28 22:20:31 -0400
committerJohn MacFarlane <jgm@berkeley.edu>2012-09-28 22:20:31 -0400
commit2fbdf9e0028db93b7913d3c13196e122a7fc2c74 (patch)
tree3a296b3a1a41cbf044e74174b0b48f7c5afd54e3 /src/Text/Pandoc
parent58909aaf219f1234b5bc61cc90dd745185c21435 (diff)
downloadpandoc-2fbdf9e0028db93b7913d3c13196e122a7fc2c74.tar.gz
RST reader: Support ".. code::".
Diffstat (limited to 'src/Text/Pandoc')
-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