From 6e6f8afb1cdb1cf94e262037b7a3b22ac96c8c88 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Feb 2026 19:39:57 +0000 Subject: [PATCH 1/2] Initial plan From b5b85fee0434b6b83da87f0f14df89f4be02d186 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Feb 2026 19:49:31 +0000 Subject: [PATCH 2/2] Sanitize no-break whitespace (U+00A0) in frontmatter before YAML parsing Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/parser/frontmatter_content.go | 3 +++ pkg/parser/frontmatter_extraction_test.go | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/pkg/parser/frontmatter_content.go b/pkg/parser/frontmatter_content.go index e736ac1b83f..203ad073c65 100644 --- a/pkg/parser/frontmatter_content.go +++ b/pkg/parser/frontmatter_content.go @@ -55,6 +55,9 @@ func ExtractFrontmatterFromContent(content string) (*FrontmatterResult, error) { frontmatterLines := lines[1:endIndex] frontmatterYAML := strings.Join(frontmatterLines, "\n") + // Sanitize no-break whitespace characters (U+00A0) which break the YAML parser + frontmatterYAML = strings.ReplaceAll(frontmatterYAML, "\u00A0", " ") + // Parse YAML var frontmatter map[string]any if err := yaml.Unmarshal([]byte(frontmatterYAML), &frontmatter); err != nil { diff --git a/pkg/parser/frontmatter_extraction_test.go b/pkg/parser/frontmatter_extraction_test.go index 10a9b69e3a2..77e342e510d 100644 --- a/pkg/parser/frontmatter_extraction_test.go +++ b/pkg/parser/frontmatter_extraction_test.go @@ -55,6 +55,15 @@ This is a test workflow with empty frontmatter.`, content: "---\ntitle: Test\nno closing delimiter", wantErr: true, }, + { + name: "no-break whitespace in values", + content: "---\ntitle:\u00A0Test\u00A0Workflow\nengine:\u00A0copilot\n---\n\n# Content", + wantYAML: map[string]any{ + "title": "Test Workflow", + "engine": "copilot", + }, + wantMarkdown: "# Content", + }, } for _, tt := range tests {