mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Merge pull request #3838 from khswong/patch-2
[toml/en] Fix code snippet formatting
This commit is contained in:
commit
f80889ed47
@ -12,7 +12,7 @@ It is an alternative to YAML and JSON. It aims to be more human friendly than JS
|
||||
Be warned, TOML's spec is still changing a lot. Until it's marked as 1.0, you
|
||||
should assume that it is unstable and act accordingly. This document follows TOML v0.4.0.
|
||||
|
||||
```
|
||||
```toml
|
||||
# Comments in TOML look like this.
|
||||
|
||||
################
|
||||
@ -223,8 +223,8 @@ emptyTableAreAllowed = true
|
||||
name = "Nail"
|
||||
sku = 284758393
|
||||
color = "gray"
|
||||
|
||||
# JSON-land styled structure:
|
||||
```
|
||||
The equivalent in JSON would be:
|
||||
```json
|
||||
{
|
||||
"products": [
|
||||
@ -242,6 +242,8 @@ color = "gray"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
```toml
|
||||
# You can create nested arrays of tables as well. Each double-bracketed
|
||||
# sub-table will belong to the nearest table element above it.
|
||||
|
||||
@ -266,11 +268,11 @@ color = "gray"
|
||||
[[fruit.color]]
|
||||
name = "yellow"
|
||||
note = "I am an array item in banana fruit's table/map"
|
||||
|
||||
```
|
||||
|
||||
# In JSON land, this code will be:
|
||||
|
||||
The equivalent in JSON would be:
|
||||
```json
|
||||
|
||||
{
|
||||
"fruit": [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user