Extends reset() selector capabilities + Custom (Key)words #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds two new features. I know is not a good ideia to send a double feature PR, but since it shares some lines between modifications and is a very small PR as well, im sending a single one to avoid rebase or conflicts. In case to not accept any mod, its just deny, in case to accept only one, i can split them.
The motivation for this feature is to let this library to be used in many situations that we have no full control of the html output (as in some doc/static generators, for example). It can be useful to determine the targets with accuracy when by class is not a possible option.
Turns the second parameter into a custom case sensitive wordlist. The wordlist must be an array of strings which will be highlighted as tokenType 1:
This will highlight the "npm", "install" and "run" words. The motivation for this feature is to extend the lib capabilities to deal with almost any situation/language.
I believe that this two features together can empower the lib in such a way that user can have a lot of flexibility and also create cool things like a snippet that highlights bash npm commands only on code tags, for example: