Fix route parsing for CRLF line endings
This commit is contained in:
parent
e90b31bb4a
commit
954f813569
@ -63,7 +63,7 @@ parseRoutesNoCheck = QuasiQuoter
|
|||||||
-- invalid input.
|
-- invalid input.
|
||||||
resourcesFromString :: String -> [ResourceTree String]
|
resourcesFromString :: String -> [ResourceTree String]
|
||||||
resourcesFromString =
|
resourcesFromString =
|
||||||
fst . parse 0 . filter (not . all (== ' ')) . lines
|
fst . parse 0 . filter (not . all (== ' ')) . lines . filter (/= '\r')
|
||||||
where
|
where
|
||||||
parse _ [] = ([], [])
|
parse _ [] = ([], [])
|
||||||
parse indent (thisLine:otherLines)
|
parse indent (thisLine:otherLines)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user