interweave icon indicating copy to clipboard operation
interweave copied to clipboard

Add option to disable interleaving for some matchers

Open sapkra opened this issue 6 years ago • 0 comments

I found out a problem with a scenario when two matchers are conflicting. One example is when I'm matching for underscores and the UrlMatcher is matching for URLs which can include underscores.

https://github.com/milesj/interweave/blob/master/packages/emoji-picker/tests/__snapshots__/Emoji.test.tsx.snap

Two links are generated and in between one part is italic. image and when I change the order just one link is generated but it's still italic: image

It would be helpful if there would be an option to disable interleaving for specific matchers. For classes it would be great to have them in the constructor options and for the objects inside the MatcherInterface.

sapkra avatar Jan 30 '20 06:01 sapkra