• Robert Knight's avatar
    Add new fuzzy quote matching implementation · d2e9f195
    Robert Knight authored
    Implement a `matchQuote` function which will be used to replace
    `dom-anchor-text-quote` for finding the best match for annotation quotes
    in the document text.
    
    The new implementation is based on the `approx-string-match` library and
    provides several improvements over the existing one:
    
     - Better performance when there are many differences between the quote
       and closest document text
    
     - It will be easier for us to tune the degree of mismatch allowed
       between the quote and document text and how candidate matches are
       ranked
    d2e9f195
match-quote.js 4.77 KB