Skip to content

Commit e5f312d

Browse files
committed
fix: fix CR comments
Signed-off-by: zong-zhe <zongzhe1024@163.com>
1 parent 09fce64 commit e5f312d

File tree

2 files changed

+10
-26
lines changed
  • blog/2024-03-06-kcl-0.8.0-release
  • i18n/zh-CN/docusaurus-plugin-content-blog/2024-03-06-kcl-0.8.0-release

2 files changed

+10
-26
lines changed

blog/2024-03-06-kcl-0.8.0-release/index.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,25 +85,17 @@ In v0.8.0, by using `yaml_stream` method, you can output the result of yaml scal
8585
```kcl
8686
import manifests
8787
88-
schema Person:
89-
name: str = "kcl"
90-
age: int = 1
91-
92-
x0 = Person {}
93-
x1 = Person {
94-
age = 101
95-
}
88+
x0 = 1
89+
x1 = 2
9690
manifests.yaml_stream([x0, x1])
9791
```
9892

9993
The compiled result is as follows:
10094

10195
```yaml
102-
name: kcl
103-
age: 1
96+
1
10497
---
105-
name: kcl
106-
age: 101
98+
2
10799
```
108100

109101
#### KCL removes the `__settings__` attribute in the compiled output

i18n/zh-CN/docusaurus-plugin-content-blog/2024-03-06-kcl-0.8.0-release/index.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -74,32 +74,24 @@ z:
7474
fullName: John-Doe1
7575
```
7676
77-
#### 支持 scalar yaml stream 输出
77+
#### 支持字面值的 yaml stream 格式输出.
7878
79-
通过 `yaml_stream` 方法,可以支持输出 yaml scalar 的结果
79+
通过 `yaml_stream` 方法,可以支持输出 yaml 字面值的结果
8080

8181
```kcl
8282
import manifests
8383
84-
schema Person:
85-
name: str = "kcl"
86-
age: int = 1
87-
88-
x0 = Person {}
89-
x1 = Person {
90-
age = 101
91-
}
84+
x0 = 1
85+
x1 = 2
9286
manifests.yaml_stream([x0, x1])
9387
```
9488

9589
对应编译结果
9690

9791
```yaml
98-
name: kcl
99-
age: 1
92+
1
10093
---
101-
name: kcl
102-
age: 101
94+
2
10395
```
10496

10597
#### 修复了在循环表达式中的类型检查错误

0 commit comments

Comments
 (0)