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

CustomMatchers should override default matchers #63

Open
Thomas-Bel opened this issue Nov 29, 2021 · 2 comments
Open

CustomMatchers should override default matchers #63

Thomas-Bel opened this issue Nov 29, 2021 · 2 comments

Comments

@Thomas-Bel
Copy link

Hi,

For our app we would like to separately process certain url patterns, while allowing all other urls to be handled normally. I tried to implement this using both url=true and a custom matcher for the special case urls, but this approach fails. The default matching is performed first, and only afterwards the custom matchers are exercised.

Is this desired behaviour?

@joshswan
Copy link
Owner

That's the current expected behavior, though I do agree that it may not be optimal. As I just mentioned in #59, it might be better for you to just disable the default matcher and implement a custom URL matcher that you can control better (for example using the regex I posted there).

Working on solutions to solve both this and #59 in a new version - leaning towards removing Autolinker.js and implementing everything as matchers that can be more easily controlled/customized.

@Thomas-Bel
Copy link
Author

Thomas-Bel commented Nov 29, 2021

Thanks for the quick response. For now I do appreciate the option to identify urls without the www or http prefix, so I have gotten it to work with patch-package by switching around the order of the two replacement operations in the Autolink file.

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

No branches or pull requests

2 participants