Skip to content

Commit 6475023

Browse files
committed
Add warning about issue #112.
1 parent 32f9fda commit 6475023

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/dom/src/text-quote/match.ts

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ import { TextNodeChunker, EmptyScopeError } from '../text-node-chunker';
4040
* return an (async) generator that produces each match in the order they are
4141
* found in the text.
4242
*
43+
* *XXX Modifying the DOM (e.g. to highlight the text) while the search is still
44+
* running can mess up and result in an error or an infinite loop. See [issue
45+
* #112](https://github.com/apache/incubator-annotator/issues/112).*
46+
*
4347
* @example
4448
* ```
4549
* // Find the word ‘banana’.

packages/selector/src/text/match-text-quote.ts

+3
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ import type { Chunk, Chunker, ChunkRange } from './chunker';
4545
* return an (async) generator that produces each match in the order they are
4646
* found in the text.
4747
*
48+
* *XXX Modifying the Chunks while the search is still running can mess up and
49+
* result in an error or an infinite loop. See [issue #112](https://github.com/apache/incubator-annotator/issues/112).*
50+
*
4851
* @example
4952
* ```
5053
* const selector = { type: 'TextQuoteSelector', exact: 'banana' };

0 commit comments

Comments
 (0)