Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions .claude/skills/dify-docs-format-check-cjk/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ The script selects zh or ja rules based on the file path. Rules fall into three
- `C-no-language`, `C-blank-before`, `C-blank-after` — code block rules.
- `Li-click-here`, `Li-http-external` — link rules.
- `I-raw-img-tag`, `I-alt-too-long`, `I-caption-alt-mismatch`, `I-filename-*` — image rules (same set as the EN skill).
- `M-tab-no-title`, `M-component-blank-before`, `M-component-blank-after` — Mintlify component rules.
- `S-double-blank`, `S-trailing-whitespace` — spacing.
- `M-tab-no-title` — Mintlify component rules.
- `S-double-blank` — spacing.
- `P-em-dash-spaces`, `P-en-dash-spaces` — general punctuation.

**Shared CJK rules (zh + ja)**
Expand Down
14 changes: 0 additions & 14 deletions .claude/skills/dify-docs-format-check-cjk/check-format-cjk.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,6 @@ def check_images(lines: list[str]) -> list[Violation]:
def check_mintlify(lines: list[str]) -> list[Violation]:
vs: list[Violation] = []
in_fence = False
callout_re = re.compile(r'^\s*<(Info|Tip|Note|Warning)\b[^>]*>',
re.IGNORECASE)
closer_re = re.compile(r'^\s*</(Info|Tip|Note|Warning)>\s*$',
re.IGNORECASE)
tab_re = re.compile(r'<Tab(?:\s+[^>]*)?>')
tab_title_re = re.compile(r'\btitle\s*=\s*"[^"]*"')
for i, line in enumerate(lines, 1):
Expand All @@ -397,13 +393,6 @@ def check_mintlify(lines: list[str]) -> list[Violation]:
continue
if in_fence:
continue
if callout_re.match(line) and i > 1 and lines[i - 2].strip() != '':
vs.append(Violation(i, 'M-component-blank-before',
'Missing blank line before callout.'))
if closer_re.match(line) and i < len(lines) \
and lines[i].strip() != '':
vs.append(Violation(i, 'M-component-blank-after',
'Missing blank line after callout.'))
for m in tab_re.finditer(line):
if not tab_title_re.search(m.group(0)):
vs.append(Violation(i, 'M-tab-no-title',
Expand All @@ -429,9 +418,6 @@ def check_spacing(lines: list[str]) -> list[Violation]:
'Consecutive blank lines.'))
else:
blank_run = 0
if line != line.rstrip():
vs.append(Violation(i, 'S-trailing-whitespace',
'Line has trailing whitespace.'))
return vs


Expand Down
2 changes: 0 additions & 2 deletions .claude/skills/dify-docs-format-check-en/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ The script checks these rules. Each violation includes the file path, line numbe
**Mintlify Components**

- `M-tab-no-title` — `<Tab>` without a `title` attribute.
- `M-component-blank-before` / `M-component-blank-after` — missing blank line around `<Info>`, `<Tip>`, `<Note>`, or `<Warning>`.

**UI Element References**

Expand All @@ -97,7 +96,6 @@ The script checks these rules. Each violation includes the file path, line numbe
**Spacing**

- `S-double-blank` — two or more consecutive blank lines.
- `S-trailing-whitespace` — line ends with whitespace.

**Punctuation**

Expand Down
25 changes: 0 additions & 25 deletions .claude/skills/dify-docs-format-check-en/check-format-en.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,6 @@ def check_images(lines: list[str]) -> list[Violation]:
def check_mintlify_components(lines: list[str]) -> list[Violation]:
vs: list[Violation] = []
in_fence = False
callout_re = re.compile(r'^\s*<(Info|Tip|Note|Warning)\b[^>]*>', re.IGNORECASE)
tab_no_title_re = re.compile(r'<Tab(?:\s+[^>]*)?>')
tab_title_attr_re = re.compile(r'\btitle\s*=\s*"[^"]*"')
for i, line in enumerate(lines, 1):
Expand All @@ -522,31 +521,11 @@ def check_mintlify_components(lines: list[str]) -> list[Violation]:
continue
if in_fence:
continue
if callout_re.match(line):
if i > 1 and lines[i - 2].strip() != '':
vs.append(Violation(
i, 'M-component-blank-before',
'Missing blank line before Mintlify callout.'))
for m in tab_no_title_re.finditer(line):
if not tab_title_attr_re.search(m.group(0)):
vs.append(Violation(
i, 'M-tab-no-title',
'<Tab> element without a title attribute.'))
# end-of-component blank
closer_re = re.compile(r'^\s*</(Info|Tip|Note|Warning)>\s*$',
re.IGNORECASE)
in_fence = False
for i, line in enumerate(lines, 1):
if FENCE_RE.match(line):
in_fence = not in_fence
continue
if in_fence:
continue
if closer_re.match(line):
if i < len(lines) and lines[i].strip() != '':
vs.append(Violation(
i, 'M-component-blank-after',
'Missing blank line after Mintlify callout.'))
return vs


Expand Down Expand Up @@ -590,10 +569,6 @@ def check_spacing(lines: list[str]) -> list[Violation]:
'Two or more consecutive blank lines.'))
else:
blank_run = 0
if line != line.rstrip():
vs.append(Violation(
i, 'S-trailing-whitespace',
'Line has trailing whitespace.'))
return vs


Expand Down
3 changes: 1 addition & 2 deletions writing-guides/formatting-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ Configure at least one model provider in **System Settings** > **Model Providers
</Info>
```

- One blank line before and after the component.
- Content inside can include bold, links, and other inline formatting.

### Tabs
Expand Down Expand Up @@ -380,7 +379,7 @@ Use for showing multiple code variants of the same operation:

## Spacing

- **One blank line** between paragraphs, before/after headings, before/after components, before/after code blocks.
- **One blank line** between paragraphs, before/after headings, before/after code blocks.
- **No double blank lines** anywhere in the file.

---
Expand Down
Loading