Release v1.0.103: forbid redundant market-doc H1
All checks were successful
技能自动化发布 / release (push) Successful in 6s
All checks were successful
技能自动化发布 / release (push) Successful in 6s
This commit is contained in:
@@ -191,6 +191,7 @@ class TestDocsStandards(unittest.TestCase):
|
||||
checklist = self._read("development/CHECKLIST.md")
|
||||
self.assertIn("A2-7", checklist)
|
||||
self.assertIn("A2-8", checklist)
|
||||
self.assertIn("A2-12", checklist)
|
||||
self.assertIn("TUTORIAL_SURFACES.md", checklist)
|
||||
|
||||
def test_naming_md_exists_and_covers_standards(self) -> None:
|
||||
|
||||
@@ -84,9 +84,32 @@ class TestTutorialSurfacesContract(unittest.TestCase):
|
||||
"定时",
|
||||
"skill-detail",
|
||||
"对照表",
|
||||
"正文不要用",
|
||||
"禁止",
|
||||
):
|
||||
self.assertIn(marker, text, msg=f"TUTORIAL_SURFACES.md missing {marker!r}")
|
||||
|
||||
def test_market_docs_forbid_redundant_page_h1(self) -> None:
|
||||
"""宿主已有技能名与 Tab 标题:说明/教程正文禁止再用 # 一级标题。"""
|
||||
|
||||
def strip_fences(src: str) -> str:
|
||||
return re.sub(r"```.*?```", "", src, flags=re.S)
|
||||
|
||||
for rel in ("README.md", "TUTORIAL.md"):
|
||||
body = strip_fences(_read(rel))
|
||||
# YAML frontmatter 里不应出现 ATX H1;正文亦禁止 #
|
||||
self.assertIsNone(
|
||||
re.search(r"(?m)^#\s+\S", body),
|
||||
msg=(
|
||||
f"{rel} must not use ATX H1 (# …); host already shows skill name / tab. "
|
||||
"Use ## for sections (see TUTORIAL_SURFACES.md §0.1)."
|
||||
),
|
||||
)
|
||||
self.assertIsNone(
|
||||
re.search(r"(?m)^#\s+.·\s*使用教程\s*$", body),
|
||||
msg=f"{rel} must not start sections with '# … · 使用教程'",
|
||||
)
|
||||
|
||||
def test_development_md_points_to_tutorial_surfaces(self) -> None:
|
||||
text = _read("development/DEVELOPMENT.md")
|
||||
self.assertIn(
|
||||
|
||||
Reference in New Issue
Block a user