Skip to content

Commit f18b1d2

Browse files
committed
Clarify string length is code points
1 parent 03bc7a0 commit f18b1d2

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.remarkrc-lint.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import remarkValidateLinks from "remark-validate-links";
22
import remarkPresetLintConsistent from "remark-preset-lint-consistent";
33
import remarkPresetLintRecommended from "remark-preset-lint-recommended";
44
import remarkPresetLintMarkdownStyleGuide from "remark-preset-lint-markdown-style-guide";
5+
import remarkLintDefinitionCase from "remark-lint-definition-case";
56
import remarkLintListItemIndent from "remark-lint-list-item-indent";
67
import remarkLintListItemSpacing from "remark-lint-list-item-spacing";
78
import remarkLintNoFileNameMixedCase from "remark-lint-no-file-name-mixed-case";
@@ -14,6 +15,7 @@ export default {
1415
remarkPresetLintConsistent,
1516
remarkPresetLintRecommended,
1617
remarkPresetLintMarkdownStyleGuide,
18+
[remarkLintDefinitionCase, false],
1719
[remarkLintListItemIndent, "one"],
1820
[remarkLintListItemSpacing, { checkBlanks: true }],
1921
[remarkLintNoFileNameMixedCase, false],

specs/jsonschema-core.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,14 @@ depending on the type:
125125
- *array*: An ordered list of instances, from the JSON "array" value
126126
- *number*: An arbitrary-precision, base-10 decimal number value, from the JSON
127127
"number" value
128-
- *string*: A string of Unicode code points, from the JSON "string" value
128+
- *string*: A string of [Unicode] code points, from the JSON "string" value
129129

130130
Whitespace and formatting concerns, including different lexical representations
131131
of numbers that are equal within the data model, are thus outside the scope of
132132
JSON Schema. Extensions to JSON Schema that wish to work with such differences
133133
in lexical representations SHOULD define keywords to precisely interpret
134134
formatted strings within the data model rather than relying on having the
135-
original JSON representation Unicode characters available.
135+
original JSON representation available.
136136

137137
Since an object cannot have two properties with the same key, behavior for a
138138
JSON document that tries to define two properties with the same key in a single
@@ -364,14 +364,14 @@ considered to be implicitly anchored at either end. All regular expression
364364
keywords in this specification and its companion documents are un-anchored.
365365

366366
Regular expressions SHOULD be built with the "u" flag (or equivalent) to provide
367-
Unicode support, or processed in such a way which provides Unicode support as
367+
[Unicode] support, or processed in such a way which provides Unicode support as
368368
defined by ECMA-262.
369369

370370
Furthermore, given the high disparity in regular expression constructs support,
371371
schema authors SHOULD limit themselves to the following regular expression
372372
tokens:
373373

374-
- individual Unicode characters, as defined by the [JSON
374+
- individual Unicode code points, as defined by the [JSON
375375
specification][rfc8259];
376376
- simple atoms: `.` (any character except line terminator);
377377
- simple character classes (`[abc]`), range character classes (`[a-z]`);
@@ -2677,3 +2677,4 @@ to the document.
26772677
[rfc6901]: https://www.rfc-editor.org/info/rfc6901
26782678
[rfc8259]: https://www.rfc-editor.org/info/rfc8259
26792679
[rfc8288]: https://www.rfc-editor.org/info/rfc8288
2680+
[Unicode]: https://www.unicode.org/versions/Unicode16.0.0/

specs/jsonschema-validation.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ The value of this keyword MUST be a non-negative integer.
218218
A string instance is valid against this keyword if its length is less than, or
219219
equal to, the value of this keyword.
220220

221-
The length of a string instance is defined as the number of its characters as
222-
defined by [RFC 8259][rfc8259].
221+
The length of a string instance is defined as the number of [Unicode] code
222+
points that make up the string.
223223

224224
#### `minLength`
225225

@@ -228,8 +228,8 @@ The value of this keyword MUST be a non-negative integer.
228228
A string instance is valid against this keyword if its length is greater than,
229229
or equal to, the value of this keyword.
230230

231-
The length of a string instance is defined as the number of its characters as
232-
defined by [RFC 8259][rfc8259].
231+
The length of a string instance is defined as the number of [Unicode] code
232+
points that make up the string.
233233

234234
Omitting this keyword has the same behavior as a value of 0.
235235

@@ -917,3 +917,4 @@ to the document.
917917

918918
[rfc3987]: https://www.rfc-editor.org/info/rfc3987
919919
[rfc8259]: https://www.rfc-editor.org/info/rfc8259
920+
[Unicode]: https://www.unicode.org/versions/Unicode16.0.0/

0 commit comments

Comments
 (0)