Parse a single character as a unit

This commit is contained in:
2025-05-20 12:20:10 -05:00
parent 2514ecdafc
commit b69e34f823

View File

@@ -220,6 +220,12 @@ parseEscapedChar = do
escapedChar <- choice (map char specialChars) -- Parse any of the special chars.
return (Unit [escapedChar])
-- Parse a character as a Unit.
parseUnit :: ReadP MdToken
parseUnit = do
text <- satisfy (`notElem` specialChars)
return (Unit [text])
-- Parse a regular string as a Unit.
parseString :: ReadP MdToken
parseString = do