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

Added regex pattern option #2

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

Added regex pattern option #2

wants to merge 1 commit into from

Conversation

ArthurClemens
Copy link

The \b delimiter pattern does not work well with non-english languages. It should actually be '(^| )' + searchString + '(?= |$)' - this should be changed in the file as well.
But to make the matching more flexible than just 'wordsOnly' I created an option to pass a regular expression pattern. That way I can make the highlighting match the actual search query, for instance "all words ending on 'an'".

@julkue
Copy link

julkue commented Mar 31, 2016

@ArthurClemens You might be interested in mark.js, which has a method for this implemented.

@ArthurClemens
Copy link
Author

After almost 5 years, I cannot remember this.

@julkue
Copy link

julkue commented Mar 31, 2016

I can understand :bowtie: Just saying, maybe this is an issues for others at present.

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.

2 participants