This is an automated email from the ASF dual-hosted git repository. gerben pushed a commit to branch import-dom-seek in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit 68f05f42ca9e9b44906c619a888a88a3381e4e72 Author: Gerben <[email protected]> AuthorDate: Thu Nov 19 18:16:10 2020 +0100 Add note on fragility. May need to rethink approach. --- packages/dom/src/text-quote/describe.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/dom/src/text-quote/describe.ts b/packages/dom/src/text-quote/describe.ts index 1a7941d..4f0c70f 100644 --- a/packages/dom/src/text-quote/describe.ts +++ b/packages/dom/src/text-quote/describe.ts @@ -79,6 +79,7 @@ async function abstractDescribeTextQuote<TChunk extends Chunk<string>>( const matches = abstractTextQuoteSelectorMatcher(tentativeSelector)(scope()); let nextMatch = await matches.next(); + // XXX This test is fragile: nextMatch and target are assumed to be normalised. if (!nextMatch.done && chunkRangeEquals(nextMatch.value, target)) { // This match is the intended one, ignore it. nextMatch = await matches.next();
