ci: gate CJK-punctuation bold regressions with a self-contained emphasis check

check_project_rules.py only checks fences + local links, so a bold marker that
CJK punctuation stops from rendering (e.g. `**(配比)**相互交织` — the closer is
preceded by punctuation and followed by a letter, so it can't close and the
asterisks print literally) would pass this repo's own CI. That class of bug had
to be swept out of every book by hand; nothing here was watching for it.

Adds check_emphasis.py — a standalone gate (identical across all books) that
runs CommonMark's flanking + process-emphasis rules and flags markers that
print literally or silently bold the wrong span. The ci.yaml content step now
runs it right after check_project_rules.py. Verified clean on this book.
This commit is contained in:
yeasy
2026-07-24 07:27:07 -07:00
parent 657c0b25df
commit 95ee0aeca5
3 changed files with 275 additions and 1 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ jobs:
- name: Check project rules, metadata, and canonical examples
run: |
python3 check_project_rules.py
python3 check_project_rules.py && python3 check_emphasis.py
npm test
python3 tools/test_examples.py --require-tools