"""替换 board-coach.html 中的助教卡片区域为新版本""" import re filepath = "docs/h5_ui/pages/board-coach.html" with open(filepath, "r", encoding="utf-8") as f: content = f.read() # 定位旧的助教列表区域 old_start = " " old_end_marker = " " start_idx = content.index(old_start) end_idx = content.index(old_end_marker) new_coach_section = '''