Skip to content

Commit fa5623a

Browse files
committed
Update (slightly) label vs identifier
Closes GH-35.
1 parent 4f5f944 commit fa5623a

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

readme.md

+17-9
Original file line numberDiff line numberDiff line change
@@ -844,17 +844,25 @@ interface mixin Association {
844844
**Association** represents an internal relation from one node to another.
845845

846846
An `identifier` field must be present.
847-
It can match an `identifier` field on another node.
847+
It can match another node.
848+
`identifier` is a source value: character escapes and character references are
849+
*not* parsed.
850+
Its value must be normalized.
848851

849852
A `label` field can be present.
850-
It represents the original value of the normalised `identifier` field.
851-
852-
Whether the value of `identifier` is expected to be a unique identifier or not
853-
depends on the type of node including the **Association**.
854-
An example of this is that `identifier` on [**Definition**][dfn-definition]
855-
should be a unique identifier, whereas multiple
856-
[**LinkReference**][dfn-link-reference]s can have the same `identifier` and be
857-
associated with one definition.
853+
`label` is a string value: it works just like `title` on a link or a `lang` on
854+
code: character escapes and character references are parsed.
855+
856+
To normalize a value, collapse markdown whitespace (`[\t\n\r ]+`) to a space,
857+
trim the optional initial and/or final space, and perform case-folding.
858+
859+
Whether the value of `identifier` (or normalized `label` if there is no
860+
`identifier`) is expected to be a unique identifier or not depends on the type
861+
of node including the **Association**.
862+
An example of this is that they should be unique on
863+
[**Definition**][dfn-definition], whereas multiple
864+
[**LinkReference**][dfn-link-reference]s can be non-unique to be associated with
865+
one definition.
858866

859867
### `Reference`
860868

0 commit comments

Comments
 (0)