Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions internal/skillscheck/template_contract_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,24 @@ func TestSuiteKeywordKeysMatchOfficialSkillDirectories(t *testing.T) {
sort.Strings(keys)
assertStrings(t, keys, directories)
}

func TestDocXMLSkillOrderedListSeqGuidance(t *testing.T) {
repoRoot := filepath.Join("..", "..")
raw, err := vfs.ReadFile(filepath.Join(repoRoot, "skills", "lark-doc", "references", "lark-doc-xml.md"))
if err != nil {
t.Fatal(err)
}
doc := string(raw)
for _, required := range []string{
`<li seq="auto">`,
`<li seq="3">`,
"`<ol>` 本身不支持 `seq`",
} {
if !strings.Contains(doc, required) {
t.Fatalf("lark-doc-xml.md must contain %q", required)
}
}
if strings.Contains(doc, `<ol seq=`) {
t.Fatal("lark-doc-xml.md must not instruct placing seq on <ol>")
}
}
2 changes: 1 addition & 1 deletion skills/lark-doc/references/lark-doc-xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
## 标题与列表编号

- 完整文档以唯一的 `<title>` 开头;正文标题使用 `<h1>` 至 `<h9>`,层级须连续,不跳级,例如 `<h1>` 后不能直接使用 `<h3>`,应先出现 `<h2>`。需要自动编号时设置 `seq="auto"`,系统会按标题层级生成并递增阿拉伯数字编号,例如一级标题为 `1`,二级标题为 `1.1`。
- 有序列表:默认属性 `seq="auto"`,需从指定数字开始时设置对应值,如 `seq="3"`。
- 有序列表(`<ol>`):`seq` 属性写在列表项 `<li>` 上(`<ol>` 本身不支持 `seq`),省略时默认为 `seq="auto"`,需从指定数字开始时设置对应值,如 `<ol><li seq="auto">第一项</li><li seq="3">第二项</li></ol>`。
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

## 表格

Expand Down
Loading