You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ge...@apache.org on 2020/09/10 20:03:55 UTC

[incubator-annotator] 03/04: Fix spec mismatch: RangeSelector’s start is inclusive.

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

commit 83e00f82efcd5df331fb95f2ec98b57cd1f1af2a
Author: Gerben <ge...@treora.com>
AuthorDate: Tue Sep 8 19:47:21 2020 +0200

    Fix spec mismatch: RangeSelector’s start is inclusive.
---
 packages/dom/src/range/match.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/dom/src/range/match.ts b/packages/dom/src/range/match.ts
index b5bbe05..c7e138a 100644
--- a/packages/dom/src/range/match.ts
+++ b/packages/dom/src/range/match.ts
@@ -40,7 +40,7 @@ export function makeCreateRangeSelectorMatcher(
       for await (const [start, end] of pairs) {
         const result = ownerDocument(scope).createRange();
 
-        result.setStart(start.endContainer, start.endOffset);
+        result.setStart(start.startContainer, start.startOffset);
         result.setEnd(end.startContainer, end.startOffset);
 
         if (!result.collapsed) yield result;