mirror of
https://github.com/github/spec-kit.git
synced 2026-08-03 06:26:30 +08:00
`preset catalog add` and `preset catalog remove` interpolate the raw `--name` and URL into `console.print()`, so Rich parses them as markup. Two failure modes: * Silent misreporting — a name like `[bold red]pwned[/]` is printed as `pwned`, so the confirmed name is not the persisted name and a later `remove` with the reported name fails. * Unhandled MarkupError — an unbalanced closing tag raises, and because the crash happens *after* preset-catalogs.yml is written, the user gets a traceback for a catalog that was in fact added. This file already imports `_escape_markup` and escapes name/description/ url in `preset catalog list` (whose invariant `test_catalog_list_escapes_ rich_markup` already pins); `add`/`remove` were the remaining gaps. Only rendering changes: the raw values are still what get persisted and what the duplicate-name comparison uses. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>