This is an automated email from the ASF dual-hosted git repository.

gerben pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git


The following commit(s) were added to refs/heads/master by this push:
     new da48584  Add comment to highlighter about using normalize()
da48584 is described below

commit da48584738a90c0972a181fa21c50251975f4503
Author: Gerben <[email protected]>
AuthorDate: Mon Aug 17 12:28:11 2020 +0200

    Add comment to highlighter about using normalize()
    
    See issue #80
---
 packages/dom/src/highlight-range.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/dom/src/highlight-range.ts 
b/packages/dom/src/highlight-range.ts
index 0dfa38f..e7b9b8e 100644
--- a/packages/dom/src/highlight-range.ts
+++ b/packages/dom/src/highlight-range.ts
@@ -21,7 +21,7 @@
 // Wrap each text node in a given DOM Range with a <mark> or other element.
 // Breaks start and/or end node if needed.
 // Returns a function that cleans up the created highlight (not a perfect 
undo: split text nodes are
-// not merged again).
+// not merged again; if desired, you could run 
range.commonAncestorContainer.normalize() afterwards).
 //
 // Parameters:
 // - range: a DOM Range object. Note that as highlighting modifies the DOM, 
the range may be

Reply via email to