From 18b71157db255c864123610035697ba4b5d0f785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jim=20Liu=20=E5=AE=9D=E7=8E=89?= Date: Wed, 28 Jan 2026 21:49:47 -0600 Subject: [PATCH] feat(baoyu-markdown-to-html): add CJK content pre-check step Suggest formatting with baoyu-format-markdown before conversion to fix bold markers with punctuation issues. --- skills/baoyu-markdown-to-html/SKILL.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/skills/baoyu-markdown-to-html/SKILL.md b/skills/baoyu-markdown-to-html/SKILL.md index eba2da1..0de2f70 100644 --- a/skills/baoyu-markdown-to-html/SKILL.md +++ b/skills/baoyu-markdown-to-html/SKILL.md @@ -47,6 +47,27 @@ test -f "$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md" && echo "user" ## Workflow +### Step 0: Pre-check (Chinese Content) + +**Condition**: Only execute if input file contains Chinese text. + +**Detection**: +1. Read input markdown file +2. Check if content contains CJK characters (Chinese/Japanese/Korean) +3. If no CJK content → skip to Step 1 + +**Format Suggestion**: + +If CJK content detected AND `baoyu-format-markdown` skill is available: + +Use `AskUserQuestion` to ask whether to format first. Formatting can fix: +- Bold markers with punctuation inside causing `**` parse failures +- CJK/English spacing issues + +**If user agrees**: Invoke `baoyu-format-markdown` skill to format the file, then use formatted file as input. + +**If user declines**: Continue with original file. + ### Step 1: Confirm Theme Before converting, use AskUserQuestion to confirm the theme (unless user already specified):