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 e69c6d1c53779ad852a41df2afca8c7c4665483b Author: Gerben <[email protected]> AuthorDate: Sun Jun 6 14:32:08 2021 +0200 tweak documentation --- packages/apache-annotator/src/dom.ts | 11 ++++------- packages/dom/src/css.ts | 3 +-- packages/dom/src/text-position/describe.ts | 4 ++-- packages/dom/src/text-position/match.ts | 5 ++--- packages/dom/src/text-quote/describe.ts | 4 ++-- 5 files changed, 11 insertions(+), 16 deletions(-) diff --git a/packages/apache-annotator/src/dom.ts b/packages/apache-annotator/src/dom.ts index 9ab4f65..bed6c17 100644 --- a/packages/apache-annotator/src/dom.ts +++ b/packages/apache-annotator/src/dom.ts @@ -20,14 +20,11 @@ /** * This module provides functions for handling annotations in the context of an - * HTML DOM; in other words, a web page. + * HTML DOM; in other words, a web page. * - * The main functionality is finding which selection of the web page a {@link https://www.w3.org/TR/2017/REC-annotation-model-20170223/#selectors - * | Selector} refers to; and, vice versa, describing a selection of the page as - * a Selector. - * - * The primary way to express selections in the web page is by {@link https://developer.mozilla.org/en-US/docs/Web/API/Range - * | Range} objects. + * The module’s main functionality is *matching* (or *‘anchoring’*) a {@link https://www.w3.org/TR/2017/REC-annotation-model-20170223/#selectors + * | Selector} to the DOM, i.e. finding which piece of a web page it refers to; + * and, vice versa, *describing* a selection of the page as a Selector. * * @module */ diff --git a/packages/dom/src/css.ts b/packages/dom/src/css.ts index 2594374..86deb91 100644 --- a/packages/dom/src/css.ts +++ b/packages/dom/src/css.ts @@ -89,8 +89,7 @@ export function createCssSelectorMatcher( * * @param element - The element that the selector should describe. * @param scope - The node that serves as the ‘document’ for purposes of finding - * a unique selector. Defaults to span the full Document that contains the - * `element`. + * a unique selector. Defaults to the full Document that contains `element`. * @returns The selector unambiguously describing `element` within `scope`. */ export async function describeCss( diff --git a/packages/dom/src/text-position/describe.ts b/packages/dom/src/text-position/describe.ts index ce33312..ceaa23a 100644 --- a/packages/dom/src/text-position/describe.ts +++ b/packages/dom/src/text-position/describe.ts @@ -49,8 +49,8 @@ import { toRange } from '../to-range'; * @param range - The {@link https://developer.mozilla.org/en-US/docs/Web/API/Range * | Range} whose text content will be described. * @param scope - A Node or Range that serves as the ‘document’ for purposes of - * finding occurrences and determining prefix and suffix. Defaults to span the - * full Document that contains the range. + * finding occurrences and determining prefix and suffix. Defaults to the full + * Document that contains `range`. * @returns The selector describing `range` within `scope`. * * @public diff --git a/packages/dom/src/text-position/match.ts b/packages/dom/src/text-position/match.ts index ac26caf..1f83528 100644 --- a/packages/dom/src/text-position/match.ts +++ b/packages/dom/src/text-position/match.ts @@ -32,9 +32,8 @@ import { TextNodeChunker } from '../text-node-chunker'; * The function is curried, taking first the selector and then the scope. * * Its end result is an (async) generator producing a single {@link https://developer.mozilla.org/en-US/docs/Web/API/Range - * | Range} to represent the match. (unlike a {@link - * TextQuoteSelector}, a TextPositionSelector cannot have - * multiple matches). + * | Range} to represent the match (unlike e.g. a {@link TextQuoteSelector}, a + * TextPositionSelector cannot have multiple matches). * * @example * ``` diff --git a/packages/dom/src/text-quote/describe.ts b/packages/dom/src/text-quote/describe.ts index 727fa40..3beff26 100644 --- a/packages/dom/src/text-quote/describe.ts +++ b/packages/dom/src/text-quote/describe.ts @@ -54,8 +54,8 @@ import { toRange } from '../to-range'; * @param range - The {@link https://developer.mozilla.org/en-US/docs/Web/API/Range * | Range} whose text content will be described * @param scope - A Node or Range that serves as the ‘document’ for purposes of - * finding occurrences and determining prefix and suffix. Defaults to span the - * full Document that contains the range. + * finding occurrences and determining prefix and suffix. Defaults to the full + * Document that contains `range`. * @param options - Options to fine-tune the function’s behaviour. * @returns The selector unambiguously describing `range` within `scope`. *
