fix(skillfrontmatter): handle colons in unquoted description values - #24
fix(skillfrontmatter): handle colons in unquoted description values#24travelliu wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the skillfrontmatter package to simplify YAML frontmatter parsing, introducing a fallback parser for unquoted colons and replacing custom parsing logic with strings.Cut. However, the removal of ParseBody introduces a breaking behavioral change by forcing downstream consumers to use the entire file content (including the frontmatter block) as the markdown body. The feedback recommends restoring ParseBody to preserve the original behavior and replacing strings.SplitSeq with strings.Split to maintain backward compatibility with Go versions older than 1.23.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
157c6e8 to
0853701
Compare
- Add FrontmatterBody and HasFrontmatter for cleaner separation of concerns - Add extractFromRaw fallback when yaml.Unmarshal fails on unquoted colons - Skip indented lines in extractFromRaw to avoid nested key misinterpretation - Restore ParseBody so consumers still receive body without frontmatter block - Update cmd_skill_scan.go to use restored ParseBody with TrimSpace - Add tests for colon-containing descriptions and nested key handling Closes #23
0853701 to
b77f56d
Compare
Summary
Fixes #23 — the YAML frontmatter parser now handles colons inside unquoted description values.
Changes
ParseBodyandBuildfunctionsFrontmatterBodyandHasFrontmatterfor cleaner separation of concernsextractFromRawfallback whenyaml.Unmarshalfails on unquoted colonscmd_skill_scan.goto useParseinstead of removedParseBodyTest plan
go test ./internal/skillfrontmatter/...passesgo test ./cmd/multica/...passes