Merge pull request #596 from dlax/rst-fieldlists
improvements to rst reader for field lists
commit9f89269941cc8b15612aaddd6ba44e9dac5293c1
authorJohn MacFarlane <jgm@berkeley.edu>
dateSun 16 Sep 2012, 10:19 (14 years ago)
parentfc31bf2b981540
src/Text/Pandoc/Readers/RST.hs+2−2
@@ -151,8 +151,8 @@ rawFieldListItem :: String -> Parser [Char] ParserState (String, String)
151151rawFieldListItem indent = try $ do
152152 string indent
153153 char ':'
154− name <- many1 $ alphaNum <|> spaceChar
155− string ": "
154+ name <- many1 $ noneOf ":"
155+ char ':'
156156 skipSpaces
157157 first <- manyTill anyChar newline
158158 rest <- option "" $ try $ do lookAhead (string indent >> spaceChar)
tests/rst-reader.rst+2−1
@@ -279,7 +279,8 @@ Field Lists
279279:address: 61 Main St.
280280:city: *Nowhere*, MA,
281281 USA
282−:phone: 123-4567
282+:phone:
283+ 123-4567
283284
284285HTML Blocks
285286===========