Skip to content

Negated rule is position - sensitive #29

@valango

Description

@valango

If the negated rule is the last that actually matches, then the result list will be empty, but otherwise not:

match(['ab'], ['a*', '!ab'])    //  --> []
match(['ab'], ['!ab', 'a*'])    //  --> ['ab']
match(['ab'], ['x', '!ab', 'a*'])    //  --> ['ab']

Because filtering is essentially a sets operation, one may expect that internal ordering of a set operand does not matter, but it does.

Not a big issue, but perhaps the readme should say something about this?

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