From e0ddb49e5594c4ebf9ff8d80e4350e4f2889d5f1 Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Mon, 25 Mar 2024 22:18:39 +0200 Subject: [PATCH 1/2] Clarify that options and attributes are unordered --- spec/formatting.md | 2 +- spec/syntax.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/spec/formatting.md b/spec/formatting.md index aae7dca597..9e6deb76ab 100644 --- a/spec/formatting.md +++ b/spec/formatting.md @@ -319,7 +319,7 @@ the following steps are taken: #### Option Resolution -The result of resolving _option_ values is a mapping of string identifiers to values. +The result of resolving _option_ values is an unordered mapping of string identifiers to values. For each _option_: diff --git a/spec/syntax.md b/spec/syntax.md index b826899751..acc1c9427b 100644 --- a/spec/syntax.md +++ b/spec/syntax.md @@ -568,6 +568,8 @@ and from each other by whitespace. Each _option_'s _identifier_ MUST be unique within the _annotation_: an _annotation_ with duplicate _option_ _identifiers_ is not valid. +The order of _options_ is not significant. + ```abnf option = identifier [s] "=" [s] (literal / variable) ``` @@ -764,6 +766,11 @@ The _value_ of an _attribute_ can be either a _literal_ or a _variable_. Multiple _attributes_ are permitted in an _expression_ or _markup_. Each _attribute_ is separated by whitespace. +Each _attribute_'s _identifier_ MUST be unique within the _expression_ or _markup_: +an _expression_ or _markup_ with duplicate _attribute_ _identifiers_ is not valid. + +The order of _attributes_ is not significant. + ```abnf attribute = "@" identifier [[s] "=" [s] (literal / variable)] From c2095c74efb1c1a422fde860521978c4069aaed7 Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Tue, 26 Mar 2024 19:11:18 +0200 Subject: [PATCH 2/2] Apply suggestions from code review --- spec/syntax.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/spec/syntax.md b/spec/syntax.md index acc1c9427b..1e7abb03e8 100644 --- a/spec/syntax.md +++ b/spec/syntax.md @@ -766,8 +766,6 @@ The _value_ of an _attribute_ can be either a _literal_ or a _variable_. Multiple _attributes_ are permitted in an _expression_ or _markup_. Each _attribute_ is separated by whitespace. -Each _attribute_'s _identifier_ MUST be unique within the _expression_ or _markup_: -an _expression_ or _markup_ with duplicate _attribute_ _identifiers_ is not valid. The order of _attributes_ is not significant.