Fixed newline bug; working on fixing the last failing test
This commit is contained in:
@@ -137,12 +137,13 @@ parseSingleNewline = do
|
||||
-- Parse a regular string as a Unit.
|
||||
parseString :: ReadP MdToken
|
||||
parseString = do
|
||||
firstChar <- get -- Must parse at least one character here
|
||||
firstChar <- satisfy (/= '\n') -- Must parse at least one non-newline character here
|
||||
text <- munch (\x -> not (elem x "#*_[\n "))
|
||||
return (Unit (firstChar : text))
|
||||
|
||||
lineParsers :: [ReadP MdToken]
|
||||
lineParsers = [parseLinebreak, parseSingleNewline, parseBold, parseItalic, parseString] -- A 'line' doesn't include a 'header'
|
||||
--lineParsers = [parseSingleNewline, parseString]
|
||||
|
||||
-- List of all parsers
|
||||
allParsers :: [ReadP MdToken]
|
||||
|
Reference in New Issue
Block a user