Update (slightly) label vs identifier · syntax-tree/mdast@fa5623a (original) (raw)

Original file line number Diff line number Diff line change
@@ -844,17 +844,25 @@ interface mixin Association {
844 844 **Association** represents an internal relation from one node to another.
845 845
846 846 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.
848 851
849 852 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.
858 866
859 867 ### `Reference`
860 868