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

Provide an optional callback to enable adding custom Matcher instances #240

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mstred
Copy link

@mstred mstred commented Jul 15, 2018

This PR might solve #169.

It offers a callback function to be defined in Autolinker's options called applyCustomMatchers, enabling the developer to add custom Matcher-based objects to the default matchers array.

The default applyCustomMatchers implementation is here declared with the intent to simulate a
"noop" function, returning an empty array if a custom implementation is not provided and keeping the current behavior just as it is.

PS.: if merged, this needs to be added to the lib docs in order to be known as a possible solution for custom matcher scenarios.

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