@@ -797,23 +797,32 @@ Inline Table
797797------------
798798
799799Inline tables provide a more compact syntax for expressing tables. They are
800- especially useful for grouped data that can otherwise quickly become verbose.
800+ especially useful for grouped nested data that can otherwise quickly become
801+ verbose.
802+
801803Inline tables are fully defined within curly braces: ` { ` and ` } ` . Within the
802804braces, zero or more comma-separated key/value pairs may appear. Key/value pairs
803805take the same form as key/value pairs in standard tables. All value types are
804806allowed, including inline tables.
805807
806- Inline tables are intended to appear on a single line. A terminating comma (also
807- called trailing comma) is not permitted after the last key/value pair in an
808- inline table. No newlines are allowed between the curly braces unless they are
809- valid within a value. Even so, it is strongly discouraged to break an inline
810- table onto multiples lines. If you find yourself gripped with this desire, it
811- means you should be using standard tables.
808+ Inline tables can have multiple key/value pairs on the same line, or they can be
809+ put on different lines. A terminating comma (also called trailing comma) is
810+ permitted after the last key/value pair.
812811
813812``` toml
814813name = { first = " Tom" , last = " Preston-Werner" }
815- point = { x = 1 , y = 2 }
814+ point = {x = 1 , y = 2 }
816815animal = { type.name = " pug" }
816+ contact = {
817+ personal = {
818+ name = " Donald Duck" ,
819+ 820+ },
821+ work = {
822+ name = " Coin cleaner" ,
823+ 824+ },
825+ }
817826```
818827
819828The inline tables above are identical to the following standard table
@@ -830,6 +839,14 @@ y = 2
830839
831840[animal ]
832841type.name = " pug"
842+
843+ [contact .personal ]
844+ name = " Donald Duck"
845+ 846+
847+ [contact .work ]
848+ name = " Coin cleaner"
849+ 833850```
834851
835852Inline tables are fully self-contained and define all keys and sub-tables within
0 commit comments