Created a separate parser list for all parsers (except the unit parser
is replaced with the non-newline unit parser); use that parser when parsing list lines
This commit is contained in:
@@ -298,17 +298,16 @@ lineParsers =
|
||||
parseUnit
|
||||
] -- A 'line' doesn't include a 'header'
|
||||
|
||||
listLineParsers :: [Parser MdToken]
|
||||
listLineParsers =
|
||||
[ parseLinebreak,
|
||||
parseEscapedChar,
|
||||
lineParsersWithoutNewline :: [Parser MdToken]
|
||||
lineParsersWithoutNewline =
|
||||
[ parseEscapedChar,
|
||||
parseCode,
|
||||
parseImage,
|
||||
parseBold,
|
||||
parseItalic,
|
||||
parseStrikethrough,
|
||||
parseLink,
|
||||
parseUnit
|
||||
parseUnitExceptNewline
|
||||
] -- A list line cannot contain newlines.
|
||||
|
||||
-- List of all parsers
|
||||
@@ -321,7 +320,7 @@ parseLineToken = fallthroughParser lineParsers
|
||||
|
||||
-- Parse any of the list line tokens.
|
||||
parseListLineToken :: Parser MdToken
|
||||
parseListLineToken = fallthroughParser listLineParsers
|
||||
parseListLineToken = fallthroughParser lineParsersWithoutNewline
|
||||
|
||||
-- Parse a line, consisting of one or more tokens.
|
||||
parseLine :: Parser MdToken
|
||||
|
Reference in New Issue
Block a user