Skip to content

fix: quote English description to fix YAML frontmatter parse error - #10

Open
yahao333 wants to merge 1 commit into
notlate-cn:mainfrom
yahao333:fix/yaml-frontmatter-en-description
Open

fix: quote English description to fix YAML frontmatter parse error#10
yahao333 wants to merge 1 commit into
notlate-cn:mainfrom
yahao333:fix/yaml-frontmatter-en-description

Conversation

@yahao333

Copy link
Copy Markdown

问题描述 / Problem

英文版 Skill 的 YAML frontmatter 无法解析,报错:

Nested mappings are not allowed in compact mappings at line 2, column 14

原因是 code-reader-en/SKILL.md 中未加引号的 description 值包含英文冒号加空格(如 modes: Quick),YAML 将其解析为嵌套映射导致失败。中文版使用全角冒号所以不受影响。

修复内容 / Changes

  1. code-reader-en/SKILL.md:为 description 值加双引号转义
  2. code-reader-en/code-reader-en.skill:重新打包,包内 SKILL.md 与旧版存档 code-reader-v2-en-skill.md(同样存在该问题)均已修复
  3. README.md:更新中英文更新日志 v2.4.1

验证 / Verification

修复前后两个文件(SKILL.md 与 .skill 包内文件)均通过 PyYAML 解析验证:

python3 -c "import yaml; yaml.safe_load(open('code-reader-en/SKILL.md').read().split('---')[1])"

相关 / Related

  • 受影响技能:code-reader-v2-en(英文版)

The unquoted 'description' value in code-reader-en/SKILL.md contains
colon-space sequences (e.g. 'modes: Quick'), which YAML treats as a
nested mapping and fails to parse ('Nested mappings are not allowed in
compact mappings'). Quote the value to fix loading of the skill.

Also repackaged code-reader-en.skill with the fixed SKILL.md and the
archived code-reader-v2-en-skill.md (same frontmatter issue).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant