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

Wildcarding not working properly against content with asterisks #28

Open
tylermurry opened this issue Mar 18, 2019 · 1 comment
Open
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@tylermurry
Copy link
Owner

tylermurry commented Mar 18, 2019

Trying to do a wildcard match against content that contains asterisks leads to a false match. For example:

"Here is some body with asterisks ***"
with a wildcard match like
"Here is {{*}} with asterisks ***"
will fail.

Adding the following test to stringSimilarity.test.js will expose the issue:

  it('should match a target with an asterisks against a wildcarded source', () => {
    expect(stringSimilarity(`before${WILDCARD}after*`, 'beforeabceafter*')).toBe(true);
  });
@tylermurry tylermurry added help wanted Extra attention is needed good first issue Good for newcomers labels Mar 18, 2019
@cjfritz
Copy link
Collaborator

cjfritz commented Apr 2, 2019

Looking into this now, hopefully I can solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants