Skip to content

Doesn't escape periods in the path #1

@blaise-io

Description

@blaise-io

Hi, thanks for putting this out there.

This line should escape periods in paths, otherwise the dot character will match any single character:
https://github.com/josefalcon/match-pattern/blob/master/index.js#L55

Could be solved by replacing it with with something like
regex += path.replace(/\./g, '\\.').replace(/\*/g, '.*?');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions