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

fixed bug in v.match which was causing it to always return true #6

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

Conversation

richardharrington
Copy link

The extra pipe character at the end of the regular expression checking for technology-related words was causing the result of the match to be an array with one empty string when none of the other words was present:

[""]

Therefore, the match was always returning true, and butt was always being converted into butt.

This pull request will fix that bug and cause the expected behavior, but keep in mind that this will cause a lot of false negatives where short nodes are inside larger nodes, like this:

<p>Our <em>cloud</em> is not the problem; our local storage is the problem.</p>

would render as "Our cloud is not the problem; our local storage is the problem."

but if the tag were removed, then "cloud" would render as "butt" (which is probably what you want), because of the presence of the word "storage" in the

tag.

So it's up to you whether to accept this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant