git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #596 from dlax/rst-fieldlists
9f89269John MacFarlane
src/Text/Pandoc/Readers/RST.hs+2−2
@@ -151,8 +151,8 @@ rawFieldListItem :: String -> Parser [Char] ParserState (String, String)
151rawFieldListItem indent = try $ do
151rawFieldListItem indent = try $ do
152 string indent
152 string indent
153 char ':'
153 char ':'
154− name <- many1 $ alphaNum <|> spaceChar
154+ name <- many1 $ noneOf ":"
155− string ": "
155+ char ':'
156 skipSpaces
156 skipSpaces
157 first <- manyTill anyChar newline
157 first <- manyTill anyChar newline
158 rest <- option "" $ try $ do lookAhead (string indent >> spaceChar)
158 rest <- option "" $ try $ do lookAhead (string indent >> spaceChar)
tests/rst-reader.rst+2−1
@@ -279,7 +279,8 @@ Field Lists
279:address: 61 Main St.
279:address: 61 Main St.
280:city: *Nowhere*, MA,
280:city: *Nowhere*, MA,
281 USA
281 USA
282+:phone:
282−:phone: 123-4567
283+ 123-4567
283
284
284HTML Blocks
285HTML Blocks
285===========
286===========