[toml/en] Fix Formatting and Syntax Highlighting

Switching between json code block and toml code block caused it to render improperly. Fixed.
This commit is contained in:
khswong 2020-01-31 16:30:16 -08:00 committed by GitHub
parent a0f91aacf9
commit 70e59f7f3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 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. should assume that it is unstable and act accordingly. This document follows TOML v0.4.0.
``` ```toml
# Comments in TOML look like this. # Comments in TOML look like this.
################ ################
@ -223,8 +223,8 @@ emptyTableAreAllowed = true
name = "Nail" name = "Nail"
sku = 284758393 sku = 284758393
color = "gray" color = "gray"
```
# JSON-land styled structure: The equivalent in JSON would be:
```json ```json
{ {
"products": [ "products": [
@ -242,6 +242,8 @@ color = "gray"
] ]
} }
``` ```
```toml
# You can create nested arrays of tables as well. Each double-bracketed # You can create nested arrays of tables as well. Each double-bracketed
# sub-table will belong to the nearest table element above it. # sub-table will belong to the nearest table element above it.
@ -266,11 +268,11 @@ color = "gray"
[[fruit.color]] [[fruit.color]]
name = "yellow" name = "yellow"
note = "I am an array item in banana fruit's table/map" note = "I am an array item in banana fruit's table/map"
``` ```
The equivalent in JSON would be:
# In JSON land, this code will be:
```json ```json
{ {
"fruit": [ "fruit": [
{ {