Skip to content

Commit 495a3fc

Browse files
committed
docs: minor changes
1 parent be7163a commit 495a3fc

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

README.cn.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ output: /The Answer is {{answer}}.$/i
102102

103103
### `Diff` 验证字符串
104104

105-
使用`diff`可以对字符串进行补充验证
105+
使用`diff`可以对字符串进行补充验证。比如可以允许字符串中把助词"的"改为"地",允许存在额外的空行。
106+
使得当字符串结果存在这些少量的不同的时候,也能通过验证。
106107

107108
```yaml
108109
---
@@ -113,8 +114,14 @@ description: 'This is a AI test fixtures file'
113114
...
114115
output: “这是应该输出的内容”
115116
diff:
116-
- add: true # 允许额外添加的空行
117+
# 允许额外添加的空行
118+
- add: true
117119
value: '\n'
120+
# 允许将"的"改为"地"
121+
- value: "的"
122+
removed: true
123+
- value: "地"
124+
added: true
118125
```
119126

120127
### 用 JSON Schema 验证

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Default template data:
132132

133133
## `Diff` String Validation
134134

135-
Using `diff` can validate and supplement string
135+
Using `diff` can help validate and supplement strings. For example, it allows the existence of extra blank lines. This ensures that when there are minor differences in the string results, they can still pass the validation.
136136

137137
```yaml
138138
---

0 commit comments

Comments
 (0)