Skip to content

Commit 7cd932a

Browse files
committed
Clarify frontmatter position rule
The `r[frontmatter.document]` rule said "Frontmatter may only be preceded by a shebang and whitespace", where the "and" could be misread as requiring both a shebang and whitespace rather than listing the set of things allowed to precede frontmatter. Since we merged the shebang prose revision (#2192), the shebang position rule now reads as a positive statement of where the shebang may appear. Let's follow the same pattern here: state positively where frontmatter may appear rather than leaning on "only" and a negative constraint. In this commit, we rewrite the rule as "Frontmatter may appear at the start of the file or after a shebang, in either case optionally preceded by whitespace." This resolves the ambiguity and parallels the shebang position rule's structure.
1 parent 4bfe8b4 commit 7cd932a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/frontmatter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fn main() {
5151
```
5252

5353
r[frontmatter.document]
54-
Frontmatter may only be preceded by a [shebang] and [whitespace].
54+
Frontmatter may appear at the start of the file or after a [shebang], in either case optionally preceded by [whitespace].
5555

5656
r[frontmatter.fence]
5757
Frontmatter must start and end with a *fence*. Each fence must start at the beginning of a line. The opening fence must consist of at least 3 and no more than 255 hyphens (`-`). The closing fence must have exactly the same number of hyphens as the opening fence. The hyphens may be followed by [horizontal whitespace].

0 commit comments

Comments
 (0)