Treora commented on issue #80: URL: https://github.com/apache/incubator-annotator/issues/80#issuecomment-635380270
> Could `Node.normalize()` be used on `highlightElement.parentNode`? Indeed! That idea popped up recently too, and is what we started doing in the demo [1][]. I was not sure yet whether we would want to do it in the `removeHighlight` function. However it would not be a perfect undo function either, as it would also merge nodes that were already split beforehand (for some reason). But might there be occasions where the user may *not* want their text nodes to be normalised? So far I have not come up with any such situation, so it may be a good idea to just run `parentNode.normalize()` indeed. [1]: https://github.com/apache/incubator-annotator/blob/ac3b5bd4b2793b8f01a12bcd328b6beb947069fc/web/demo/index.js#L91 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org