Port of .NET PR #5610.
Python's _extract_frontmatter() uses a simple regex (YAML_KV_RE) that only matches single-line key: value pairs. YAML block scalars (|, >, |-, >+) are silently truncated to just the scalar indicator character.
For example, this SKILL.md:
---
name: my-skill
description: |
This is a multi-line
description block
---
Would parse description as | instead of the full multi-line text.
Changes needed
- Update
_extract_frontmatter() to detect block scalar indicators and consume subsequent indented lines
- Handle literal (
|) and folded (>) block scalars with chomping variants (-, +)
- Add unit tests for block scalar parsing
Port of .NET PR #5610.
Python's
_extract_frontmatter()uses a simple regex (YAML_KV_RE) that only matches single-linekey: valuepairs. YAML block scalars (|,>,|-,>+) are silently truncated to just the scalar indicator character.For example, this SKILL.md:
Would parse
descriptionas|instead of the full multi-line text.Changes needed
_extract_frontmatter()to detect block scalar indicators and consume subsequent indented lines|) and folded (>) block scalars with chomping variants (-,+)