Skip to content

fix(skill_engine): read block-scalar values in get_frontmatter_field#108

Open
santhreal wants to merge 2 commits into
HKUDS:mainfrom
santhreal:fix/get-frontmatter-block-scalar
Open

fix(skill_engine): read block-scalar values in get_frontmatter_field#108
santhreal wants to merge 2 commits into
HKUDS:mainfrom
santhreal:fix/get-frontmatter-block-scalar

Conversation

@santhreal

Copy link
Copy Markdown

Problem

get_frontmatter_field returned the literal | for description: | block scalars, so callers skipped filling a real description.

Repro

from openspace.skill_engine.skill_utils import get_frontmatter_field

src = "---\nname: x\ndescription: |\n  line1\n  line2\n---\n"
assert get_frontmatter_field(src, "description") == "line1\nline2"

Fix

Collect indented continuation lines for | / > markers in the existing line walker (works without PyYAML; plain scalars unchanged).

Line-oriented lookup returned the literal "|" for description: | blocks.
Delegate to parse_frontmatter so indented body lines are kept.
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