Commit 76f42211 authored by Randall Leeds's avatar Randall Leeds

The prefix is probably not worth it on long quotes

It'll cause more false positives than it helps.
parent 66db778f
......@@ -238,8 +238,9 @@ class TextQuoteAnchor extends Anchor
slices = @quote.match(/(.|[\r\n]){1,32}/g)
loc = @start ? root.textContent.length / 2
# TODO: use the suffix
dmp.Match_Distance = root.textContent.length * 2
if @prefix?
if @prefix? and @quote.length < 32
loc = Math.max(0, loc - @prefix.length)
result = dmp.match_main(root.textContent, @prefix, loc)
start = result + @prefix.length
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment