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 universal link parser #39

Merged
merged 4 commits into from
Nov 24, 2021
Merged

Fix universal link parser #39

merged 4 commits into from
Nov 24, 2021

Conversation

giginet
Copy link
Owner

@giginet giginet commented Nov 24, 2021

ContextParser can't compare between universaLink sources correctly.
The parser doesn't care URL hosts at all.

Due to this miss-implementation, a router that has multiple univerallink sources may not work correctly.

I fixed this issue and add tests.

@giginet giginet changed the title Fix multiple universal link Fix universal link parser Nov 24, 2021
@@ -20,6 +20,7 @@ final class ParserTests: XCTestCase {
("pokedex://pokemons/fire", "POKEDEX://POKEMONS/FIRE", false, #line),
("pokedex://", "pokedex://", true, #line),
("http://my-awesome-pokedex.com", "http://my-awesome-pokedex.com", true, #line),
("http://my-awesome-pokedex.com/pokemons/:id", "http://totally-different-url.com/pokemons/100", false, #line),
Copy link
Owner Author

Choose a reason for hiding this comment

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

In the current implementation, the parser can parse http://totally-different-url.com/pokemons/100 in this pattern (http://my-awesome-pokedex.com/pokemons/:id).

@giginet giginet merged commit 0e203c9 into master Nov 24, 2021
@giginet giginet deleted the fix-multiple-universal-link branch November 24, 2021 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant