git.iko.soy/typeable/pandoc
on master help sign in
Muse reader: fix reading of multiline definitions
e32657aAlexander Krotov
src/Text/Pandoc/Readers/Muse.hs+2−2
@@ -467,8 +467,8 @@ definitionListItem = try $ do
467 where
467 where
468 termParser = (guardDisabled Ext_amuse <|> void spaceChar) >> -- Initial space is required by Amusewiki, but not Emacs Muse
468 termParser = (guardDisabled Ext_amuse <|> void spaceChar) >> -- Initial space is required by Amusewiki, but not Emacs Muse
469 many spaceChar >>
469 many spaceChar >>
470− many1Till anyChar (lookAhead (void (try (spaceChar >> string "::")) <|> void newline))
470+ many1Till (noneOf "\n") (lookAhead (void (try (spaceChar >> string "::"))))
471− endOfInput = try $ skipMany blankline >> skipSpaces >> eof
471+ endOfInput = lookAhead $ try $ skipMany blankline >> skipSpaces >> eof
472 twoBlankLines = try $ blankline >> skipMany1 blankline
472 twoBlankLines = try $ blankline >> skipMany1 blankline
473 newDefinitionListItem = try $ void termParser
473 newDefinitionListItem = try $ void termParser
474 endOfListItemElement = lookAhead $ endOfInput <|> newDefinitionListItem <|> twoBlankLines
474 endOfListItemElement = lookAhead $ endOfInput <|> newDefinitionListItem <|> twoBlankLines