Skip to content

Commit

Permalink
Allow lines of dashes in route files
Browse files Browse the repository at this point in the history
Code taken from -
yesodweb/yesod@3640d75
  • Loading branch information
ajnsit committed Apr 23, 2016
1 parent 463efba commit 650722d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Network/Wai/Middleware/Routes/Parse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Language.Haskell.TH.Quote
import qualified System.IO as SIO
import Network.Wai.Middleware.Routes.TH
import Network.Wai.Middleware.Routes.Overlap (findOverlapNames)
import Data.List (foldl')
import Data.List (foldl', isPrefixOf)
import Data.Maybe (mapMaybe)
import qualified Data.Set as Set

Expand Down Expand Up @@ -86,7 +86,7 @@ resourcesFromString =
spaces = takeWhile (== ' ') thisLine
(others, remainder) = parse indent otherLines'
(this, otherLines') =
case takeWhile (/= "--") $ words thisLine of
case takeWhile (not . isPrefixOf "--") $ words thisLine of
(pattern:rest0)
| Just (constr:rest) <- stripColonLast rest0
, Just attrs <- mapM parseAttr rest ->
Expand Down

0 comments on commit 650722d

Please sign in to comment.