Skip to content

Commit 6934572

Browse files
authored
Merge pull request #996 from arp242/rc
Revert "Permit more control characters in comments (#924)"
2 parents 78fcf9d + 8132f34 commit 6934572

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
- Clarify that comments never affect the tables produced by parsers.
66
- Clarify Unicode and UTF-8 references.
7-
- Relax comment parsing; most control characters are again permitted.
87
- Allow newline after key/values in inline tables.
98
- Allow trailing comma in inline tables.
109
- Clarify where and how dotted keys define tables.

toml.abnf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ newline =/ %x0D.0A ; CRLF
3737

3838
;; Comment
3939

40-
comment = comment-start-symbol *allowed-comment-char
4140
comment-start-symbol = %x23 ; #
42-
allowed-comment-char = %x01-09 / %x0E-7F / non-ascii
4341
non-ascii = %x80-D7FF / %xE000-10FFFF
42+
non-eol = %x09 / %x20-7E / non-ascii
43+
44+
comment = comment-start-symbol *non-eol
4445

4546
;; Key-Value pairs
4647

toml.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ key = "value" # This is a comment at the end of a line
5757
another = "# This is not a comment"
5858
```
5959

60-
Comments may contain any Unicode code points except the following control codes
61-
that could cause problems during editing or processing: U+0000, and U+000A to
62-
U+000D.
60+
Control characters other than tab (U+0000 to U+0008, U+000A to U+001F, U+007F)
61+
are not permitted in comments.
6362

6463
Comments should be used to communicate between the human readers of a file.
6564
Parsers must not modify keys or values, based on the presence (or contents) of a

0 commit comments

Comments
 (0)