From 4a1ba8ce49ffc3c2a154721dc18fc48896f97f59 Mon Sep 17 00:00:00 2001 From: Greg Maslov Date: Sun, 25 Mar 2012 05:03:35 -0400 Subject: Oops! Forgot to munch whitespace / ignore body after directive. --- src/Text/Pandoc/Readers/RST.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index 2fbf11cf7..35fe5d768 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -539,13 +539,16 @@ bulletList = many1 (listItem bulletListStart) >>= defaultRoleBlock :: GenParser Char ParserState Block defaultRoleBlock = try $ do - string ".. default-role:: " + string ".. default-role::" + -- doesn't enforce any restrictions on the role name; embedded spaces shouldn't be allowed, for one role <- manyTill anyChar newline >>= return . removeLeadingTrailingSpace updateState $ \s -> s { stateRstDefaultRole = if null role then stateRstDefaultRole defaultParserState else role } + -- skip body of the directive if it exists + many $ blanklines <|> (spaceChar >> manyTill anyChar newline) return Null -- -- cgit v1.2.3