Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #37 #39

Merged
merged 3 commits into from
Sep 23, 2017
Merged

fix #37 #39

merged 3 commits into from
Sep 23, 2017

Conversation

coot
Copy link

@coot coot commented May 6, 2017

No description provided.

@@ -36,4 +40,4 @@ parsePart str = fromMaybe (Path str) do
-- | applied to every hash part (usually `decodeURIComponent`)
parse :: (String -> String) -> String -> Route
parse decoder hash =
map ( decoder >>> parsePart ) $ fromFoldable (S.split (S.Pattern "/") hash)
map ( decoder >>> parsePart ) $ fromFoldable (R.split (unsafePartial fromRight $ R.regex "\\/|(?=\\?)" R.noFlags) hash)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move the pattern out into a toplevel definition please? 👍 after that.

Copy link
Member

@garyb garyb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@coot
Copy link
Author

coot commented Sep 23, 2017

Nice, after the merge I'll be able to delete a workaround in cofree-react-router.

@garyb garyb merged commit bc97e20 into purescript-contrib:master Sep 23, 2017
@coot coot deleted the url-parsing branch September 23, 2017 10:23
@garyb
Copy link
Member

garyb commented Sep 23, 2017

Yeah, sorry, I didn't realise there were a bunch of outstanding PRs until I saw the Aff one. All released now 😄.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants