Skip to content

Commit bbad249

Browse files
committed
feat: add list json/yaml format spec.
1 parent 803e6f4 commit bbad249

File tree

4 files changed

+36
-0
lines changed
  • docs/reference/lang
  • i18n/zh-CN/docusaurus-plugin-content-docs
  • versioned_docs/version-0.5.6/reference/lang

4 files changed

+36
-0
lines changed

docs/reference/lang/tour.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ myDict = {
377377
"key1" = "value1"
378378
"key2" = "value2"
379379
}
380+
myList = [1, 2, 3]
380381
381382
d = "here is myDict in json: ${myDict: #json}"
382383
# d: 'here is myDict in json: {"key1": "value1", "key2": "value2"}'
@@ -386,6 +387,14 @@ e = "here is myDict in yaml:\n${myDict: #yaml}"
386387
# here is myDict in yaml:
387388
# key1: value1
388389
# key2: value2
390+
391+
f = "here is myList in json: ${myList: #json}"
392+
# f: 'here is myList in json: [1, 2, 3]'
393+
g = "here is myList in yaml: ${myList: #yaml}"
394+
# g: |
395+
# here is myList in yaml: - 1
396+
# - 2
397+
# - 3
389398
```
390399

391400
Besides, we can see some symbols in the example code output **YAML string** above such as `|`, `>`, `+`, `-`.

i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/lang/tour.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ myDict = {
377377
"key1" = "value1"
378378
"key2" = "value2"
379379
}
380+
myList = [1, 2, 3]
380381
381382
d = "here is myDict in json: ${myDict: #json}"
382383
# d: 'here is myDict in json: {"key1": "value1", "key2": "value2"}'
@@ -386,6 +387,14 @@ e = "here is myDict in yaml:\n${myDict: #yaml}"
386387
# here is myDict in yaml:
387388
# key1: value1
388389
# key2: value2
390+
391+
f = "here is myList in json: ${myList: #json}"
392+
# f: 'here is myList in json: [1, 2, 3]'
393+
g = "here is myList in yaml: ${myList: #yaml}"
394+
# g: |
395+
# here is myList in yaml: - 1
396+
# - 2
397+
# - 3
389398
```
390399

391400
此外,我们可以在上面的示例代码输出 **YAML 字符串** 中看到一些符号,例如 `|`、`>`、`+`、`-`。

i18n/zh-CN/docusaurus-plugin-content-docs/version-0.5.6/reference/lang/tour.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ myDict = {
377377
"key1" = "value1"
378378
"key2" = "value2"
379379
}
380+
myList = [1, 2, 3]
380381
381382
d = "here is myDict in json: ${myDict: #json}"
382383
# d: 'here is myDict in json: {"key1": "value1", "key2": "value2"}'
@@ -386,6 +387,14 @@ e = "here is myDict in yaml:\n${myDict: #yaml}"
386387
# here is myDict in yaml:
387388
# key1: value1
388389
# key2: value2
390+
391+
f = "here is myList in json: ${myList: #json}"
392+
# f: 'here is myList in json: [1, 2, 3]'
393+
g = "here is myList in yaml: ${myList: #yaml}"
394+
# g: |
395+
# here is myList in yaml: - 1
396+
# - 2
397+
# - 3
389398
```
390399

391400
此外,我们可以在上面的示例代码输出 **YAML 字符串** 中看到一些符号,例如 `|`、`>`、`+`、`-`。

versioned_docs/version-0.5.6/reference/lang/tour.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ myDict = {
377377
"key1" = "value1"
378378
"key2" = "value2"
379379
}
380+
myList = [1, 2, 3]
380381
381382
d = "here is myDict in json: ${myDict: #json}"
382383
# d: 'here is myDict in json: {"key1": "value1", "key2": "value2"}'
@@ -386,6 +387,14 @@ e = "here is myDict in yaml:\n${myDict: #yaml}"
386387
# here is myDict in yaml:
387388
# key1: value1
388389
# key2: value2
390+
391+
f = "here is myList in json: ${myList: #json}"
392+
# f: 'here is myList in json: [1, 2, 3]'
393+
g = "here is myList in yaml: ${myList: #yaml}"
394+
# g: |
395+
# here is myList in yaml: - 1
396+
# - 2
397+
# - 3
389398
```
390399

391400
Besides, we can see some symbols in the example code output **YAML string** above such as `|`, `>`, `+`, `-`.

0 commit comments

Comments
 (0)