From b88e3c9911ad13d682e62729378b44d463fe81e4 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Thu, 12 Dec 2019 19:40:29 -0500 Subject: [PATCH] Editorial: Minor cleanup (#91) --- README.md | 4 ++-- spec.html | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 963b5c1..fc14141 100644 --- a/README.md +++ b/README.md @@ -194,7 +194,7 @@ All of these boundary types are actually locale-dependent, and some allow comple ### What exactly does the index refer to? An index *n* refers to the code unit index within a string that is potentially the start of a segment. -For example, when iterating over the string "Hello, world💙" by words in English,segments will start at indexes 0, 5, 6, 7, 12, and 14 (i.e., the string gets segmented like `┃Hello┃,┃ ┃world┃💙┃`, with the final segment consisting of a surrogate pair of two code units encoding a single code point). +For example, when iterating over the string "Hello, world💙" by words in English,segments will start at indexes 0, 5, 6, 7, and 12 (i.e., the string gets segmented like `┃Hello┃,┃ ┃world┃💙┃`, with the final segment consisting of a surrogate pair of two code units encoding a single code point). The definition of these boundary indexes does not depend on whether forwards or backwards iteration is used. ### What happens when segmenting an empty string? @@ -205,7 +205,7 @@ We essentially synthesize two positions at which there is no segment (not just f ### What happens when I try to use random access with non-Number values? -Someone's in QA. 😉 +_Someone's_ in QA. 😉 The random access methods treat `undefined` starting index the same as unspecified, and will start from the current index. All other inputs are processed into integer Numbers—`null` becomes 0, Booleans become 0 or 1, Strings are parsed as string numeric literals, Objects are cast to primitives, and Symbols, BigInts, and `NaN` fail. Fractional components are truncated, but infinite Numbers are accepted as-is. diff --git a/spec.html b/spec.html index 27bb556..181d8bf 100644 --- a/spec.html +++ b/spec.html @@ -269,7 +269,6 @@

AdvanceSegmentIterator ( _iterator_, _lastIndex_, _direction_ )

Boundary determination is implementation-dependent, but general default algorithms are specified in Unicode Standard Annex 29 (available at https://www.unicode.org/reports/tr29/). It is recommended that implementations use locale-sensitive tailorings such as those provided by the Common Locale Data Repository (available at http://cldr.unicode.org). 1. Assert: Type(_iterator_) is Object and _iterator_ has an [[IteratingSegmenter]] internal slot. - 1. Perform ? RequireInternalSlot(_iterator_, [[IteratingSegmenter]]). 1. Let _segmenter_ be _iterator_.[[IteratingSegmenter]]. 1. Let _locale_ be _segmenter_.[[Locale]]. 1. Let _granularity_ be _segmenter_.[[SegmenterGranularity]].