Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

"Space word jump" heuristic works incorrectly when abbreviation has a space #9

@dko-slapdash

Description

@dko-slapdash

I'm trying to set SCORE_CHARACTER_JUMP=0 to disable matching mid-word characters.
This is to e.g. not let “Filter by: Assigned To” string to match "test" abbreviation which makes sense.
Like "words prefix-only search".

But it has some side effect in how the library processes spaces.

Imagine for simplicity that we have string="se f" and abbreviation="s f"

In this case, we expect that the abbreviation will perfectly match the string, but it doesn't happen - the score returned is 0.

I think the solution is following:

image

I.e. if the currently checked abbreviation character is a space, and there is a space in the string, we should continue no matter how far this space is (not necessarily if the current string character is also a space).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions