Permalink
Browse files

Fix route parsing for CRLF line endings

  • Loading branch information...
1 parent e90b31b commit 954f813569278ea80df61942537c91c1ab79d78e @snoyberg snoyberg committed Feb 7, 2017
Showing with 1 addition and 1 deletion.
  1. +1 −1 yesod-core/Yesod/Routes/Parse.hs
@@ -63,7 +63,7 @@ parseRoutesNoCheck = QuasiQuoter
-- invalid input.
resourcesFromString :: String -> [ResourceTree String]
resourcesFromString =
- fst . parse 0 . filter (not . all (== ' ')) . lines
+ fst . parse 0 . filter (not . all (== ' ')) . lines . filter (/= '\r')
where
parse _ [] = ([], [])
parse indent (thisLine:otherLines)

0 comments on commit 954f813

Please sign in to comment.