Normalize fullwidth punctuation to ASCII across codebase.

Add scripts/normalize_ambiguous_unicode.py; fix corrupted patch_instance_theme_templates.py. Preserves curly quotes in string literals; removes Git homoglyph warnings on .env.example.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-08 23:42:26 +08:00
parent aaa72c7961
commit b733e551a0
392 changed files with 71522 additions and 71369 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
"""中控「策略说明」读取 docs/strategy MD + checklists JSON"""
"""中控「策略说明」:读取 docs/strategy MD + checklists JSON."""
from __future__ import annotations
@@ -47,7 +47,7 @@ def _md_path(exchange_key: str) -> Path:
def _parse_version(md_text: str) -> str:
m = re.search(r">\s*\*\*状态\*\*[:]\s*(v[\d.]+)", md_text)
m = re.search(r">\s*\*\*状态\*\*[::]\s*(v[\d.]+)", md_text)
if m:
return m.group(1)
m = re.search(r"\|\s*v([\d.]+)\s*\|", md_text)
@@ -409,7 +409,7 @@ def build_print_html(exchange_key: str, part: str = "doc") -> str:
<p class="doc-meta">{escape_html(label)} · {escape_html(version)} · 打印 {escape_html(now)}</p>
</header>
<div class="doc-body">{payload.get("strategy_html") or ""}</div>
<footer class="doc-foot">文档{escape_html(str(source))}{(" · " + escape_html(version)) if version else ""}</footer>
<footer class="doc-foot">文档:{escape_html(str(source))}{(" · " + escape_html(version)) if version else ""}</footer>
</article>"""
else:
raise KeyError(part)