mirror of
https://github.com/github/spec-kit.git
synced 2026-03-23 22:03:08 +00:00
fix(cli): add allow_unicode=True and encoding="utf-8" to YAML I/O (#1936)
None of the yaml.dump() calls specify allow_unicode=True, causing non-ASCII characters in extension descriptions to be escaped to \uXXXX sequences in generated .agent.md frontmatter and config files. Add allow_unicode=True to all 6 yaml.dump() call sites, and encoding="utf-8" to all corresponding write_text() and read_text() calls to ensure consistent UTF-8 handling across platforms.
This commit is contained in:
@@ -747,6 +747,18 @@ $ARGUMENTS
|
||||
assert output.endswith("---\n")
|
||||
assert "description: Test command" in output
|
||||
|
||||
def test_render_frontmatter_unicode(self):
|
||||
"""Test rendering frontmatter preserves non-ASCII characters."""
|
||||
frontmatter = {
|
||||
"description": "Prüfe Konformität der Implementierung"
|
||||
}
|
||||
|
||||
registrar = CommandRegistrar()
|
||||
output = registrar.render_frontmatter(frontmatter)
|
||||
|
||||
assert "Prüfe Konformität" in output
|
||||
assert "\\u" not in output
|
||||
|
||||
def test_register_commands_for_claude(self, extension_dir, project_dir):
|
||||
"""Test registering commands for Claude agent."""
|
||||
# Create .claude directory
|
||||
|
||||
Reference in New Issue
Block a user