Filter out blank lines in route parsing #629

This commit is contained in:
Michael Snoyman 2013-12-11 17:00:03 +02:00
parent f88c927875
commit 48ea50ac93

View File

@ -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)