Skip to content

Commit 4e80a83

Browse files
authored
Polish up the README (#732)
1 parent 0050f6f commit 4e80a83

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

README.md

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ obvious semantics. TOML is designed to map unambiguously to a hash table. TOML
2828
should be easy to parse into data structures in a wide variety of languages.
2929

3030
Table of contents
31-
-------
31+
-----------------
3232

3333
- [Example](#user-content-example)
3434
- [Spec](#user-content-spec)
@@ -103,7 +103,8 @@ Spec
103103
Comment
104104
-------
105105

106-
A hash symbol marks the rest of the line as a comment, except when inside a string.
106+
A hash symbol marks the rest of the line as a comment, except when inside a
107+
string.
107108

108109
```toml
109110
# This is a full-line comment
@@ -146,8 +147,8 @@ Unspecified values are invalid.
146147
key = # INVALID
147148
```
148149

149-
There must be a newline after a key/value pair.
150-
(See [Inline Table](#user-content-inline-table) for exceptions.)
150+
There must be a newline (or EOF) after a key/value pair. (See [Inline
151+
Table](#user-content-inline-table) for exceptions.)
151152

152153
```
153154
first = "Tom" last = "Preston-Werner" # INVALID
@@ -318,9 +319,10 @@ For convenience, some popular characters have a compact escape sequence.
318319
```
319320

320321
Any Unicode character may be escaped with the `\uXXXX` or `\UXXXXXXXX` forms.
321-
The escape codes must be valid Unicode [scalar values](http://unicode.org/glossary/#unicode_scalar_value).
322+
The escape codes must be valid Unicode [scalar
323+
values](http://unicode.org/glossary/#unicode_scalar_value).
322324

323-
All other escape sequences not listed above are reserved and, if used, TOML
325+
All other escape sequences not listed above are reserved; if they are used, TOML
324326
should produce an error.
325327

326328
Sometimes you need to express passages of text (e.g. translation files) or would
@@ -538,9 +540,9 @@ sf2 = +inf # positive infinity
538540
sf3 = -inf # negative infinity
539541

540542
# not a number
541-
sf4 = nan # actual sNaN/qNaN encoding is implementation specific
543+
sf4 = nan # actual sNaN/qNaN encoding is implementation-specific
542544
sf5 = +nan # same as `nan`
543-
sf6 = -nan # valid, actual encoding is implementation specific
545+
sf6 = -nan # valid, actual encoding is implementation-specific
544546
```
545547

546548
Boolean
@@ -554,7 +556,7 @@ bool2 = false
554556
```
555557

556558
Offset Date-Time
557-
---------------
559+
----------------
558560

559561
To unambiguously represent a specific instant in time, you may use an
560562
[RFC 3339](http://tools.ietf.org/html/rfc3339) formatted date-time with offset.
@@ -572,13 +574,13 @@ time with a space (as permitted by RFC 3339 section 5.6).
572574
odt4 = 1979-05-27 07:32:00Z
573575
```
574576

575-
The precision of fractional seconds is implementation specific, but at least
577+
The precision of fractional seconds is implementation-specific, but at least
576578
millisecond precision is expected. If the value contains greater precision than
577579
the implementation can support, the additional precision must be truncated, not
578580
rounded.
579581

580582
Local Date-Time
581-
--------------
583+
---------------
582584

583585
If you omit the offset from an [RFC 3339](http://tools.ietf.org/html/rfc3339)
584586
formatted date-time, it will represent the given date-time without any relation
@@ -591,7 +593,7 @@ ldt1 = 1979-05-27T07:32:00
591593
ldt2 = 1979-05-27T00:32:00.999999
592594
```
593595

594-
The precision of fractional seconds is implementation specific, but at least
596+
The precision of fractional seconds is implementation-specific, but at least
595597
millisecond precision is expected. If the value contains greater precision than
596598
the implementation can support, the additional precision must be truncated, not
597599
rounded.
@@ -620,7 +622,7 @@ lt1 = 07:32:00
620622
lt2 = 00:32:00.999999
621623
```
622624

623-
The precision of fractional seconds is implementation specific, but at least
625+
The precision of fractional seconds is implementation-specific, but at least
624626
millisecond precision is expected. If the value contains greater precision than
625627
the implementation can support, the additional precision must be truncated, not
626628
rounded.
@@ -686,7 +688,8 @@ key1 = "another string"
686688
key2 = 456
687689
```
688690

689-
Naming rules for tables are the same as for keys (see definition of Keys above).
691+
Naming rules for tables are the same as for keys (see definition of
692+
[Keys](#user-content-keys) above).
690693

691694
```toml
692695
[dog."tater.man"]
@@ -786,8 +789,8 @@ Inline Table
786789

787790
Inline tables provide a more compact syntax for expressing tables. They are
788791
especially useful for grouped data that can otherwise quickly become verbose.
789-
Inline tables are enclosed in curly braces `{` and `}`. Within the braces, zero
790-
or more comma separated key/value pairs may appear. Key/value pairs take the
792+
Inline tables are enclosed in curly braces: `{` and `}`. Within the braces, zero
793+
or more comma-separated key/value pairs may appear. Key/value pairs take the
791794
same form as key/value pairs in standard tables. All value types are allowed,
792795
including inline tables.
793796

@@ -818,7 +821,6 @@ y = 2
818821

819822
[animal]
820823
type.name = "pug"
821-
822824
```
823825

824826
Inline tables fully define the keys and sub-tables within them. New keys and
@@ -842,7 +844,7 @@ type.name = "Nail"
842844
Array of Tables
843845
---------------
844846

845-
The last type that has not yet been expressed is an array of tables. These can
847+
The last type that has not yet been described is an array of tables. These can
846848
be expressed by using a table name in double brackets. Under that, and until the
847849
next table or EOF are the key/values of that table. Each table with the same
848850
double bracketed name will be an element in the array of tables. The tables are
@@ -1030,15 +1032,15 @@ Documentation, bug reports, pull requests, and all other contributions
10301032
are welcome!
10311033

10321034
Wiki
1033-
----------------------------------------------------------------------
1035+
----
10341036

10351037
We have an [Official TOML Wiki](https://github.com/toml-lang/toml/wiki) that
10361038
catalogs the following:
10371039

10381040
* Projects using TOML
10391041
* Implementations
10401042
* Validators
1041-
* Language agnostic test suite for TOML decoders and encoders
1043+
* Language-agnostic test suite for TOML decoders and encoders
10421044
* Editor support
10431045
* Encoders
10441046
* Converters

0 commit comments

Comments
 (0)