Markdown writer: don't crash on Str "".

This commit is contained in:
John MacFarlane 2017-08-26 21:30:00 -07:00
parent 1b3431a165
commit 6437695574

View file

@ -931,7 +931,7 @@ avoidBadWrapsInList (s:Str cs:[])
avoidBadWrapsInList (x:xs) = x : avoidBadWrapsInList xs
isOrderedListMarker :: String -> Bool
isOrderedListMarker xs = (last xs `elem` ['.',')']) &&
isOrderedListMarker xs = not (null xs) && (last xs `elem` ['.',')']) &&
isRight (runParser (anyOrderedListMarker >> eof)
defaultParserState "" xs)