Skip to content

problematic replacementTable suggest behaviour #46

@kofifus

Description

@kofifus

In the current implementation, when a suggestion match is found with the replacement table, the search stops, see https://github.com/cfinke/Typo.js/blob/master/typo/typo.js#L767

This is problematic as more matches are possible.

An example is the word 'bere', the current implementation finds a match in
replacementTable[18] -> replacementEntry = ["ere", "ear"]
adds the match 'bear' and exits

Many other matches (ie 'bare' or 'beer') are not given, the correct behavior should be to continue searching.

This is fixed in #45

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