Filter out blank lines in route parsing #629
This commit is contained in:
parent
f88c927875
commit
48ea50ac93
@ -60,7 +60,7 @@ parseRoutesNoCheck = QuasiQuoter
|
|||||||
-- invalid input.
|
-- invalid input.
|
||||||
resourcesFromString :: String -> [ResourceTree String]
|
resourcesFromString :: String -> [ResourceTree String]
|
||||||
resourcesFromString =
|
resourcesFromString =
|
||||||
fst . parse 0 . lines
|
fst . parse 0 . filter (not . all (== ' ')) . lines
|
||||||
where
|
where
|
||||||
parse _ [] = ([], [])
|
parse _ [] = ([], [])
|
||||||
parse indent (thisLine:otherLines)
|
parse indent (thisLine:otherLines)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user