Skip to content

fix: autocomplete search crashes on ANSI category badges - #207

Merged
ulises-jeremias merged 1 commit into
mainfrom
fix/autocomplete-ansi-html
Jul 17, 2026
Merged

fix: autocomplete search crashes on ANSI category badges#207
ulises-jeremias merged 1 commit into
mainfrom
fix/autocomplete-ansi-html

Conversation

@ulises-jeremias

Copy link
Copy Markdown
Member

Summary

  • questionary.autocomplete formats choice text as HTML; ANSI category badges make prompt_toolkit's XML parser raise `not well-formed (invalid token)` while typing
  • Use plain fixed-width badges in template choice titles (CNA can keep picocolors because `prompts` does not HTML-parse titles)
  • Add regression test + update UI/UX handoff notes

Test plan

  • `pytest` catalog + interactive tests
  • Live catalog titles format as HTML without error
  • After 0.2.2: `uvx --refresh create-awesome-python-app` and type to filter templates

Made with Cursor

questionary wraps choice text in HTML for match highlighting; ANSI category
badges caused "not well-formed (invalid token)" while typing to search.
Co-authored-by: Cursor <cursoragent@cursor.com>
@ulises-jeremias
ulises-jeremias merged commit f7a12cc into mainJul 17, 2026
13 checks passed
@ulises-jeremias
ulises-jeremias deleted the fix/autocomplete-ansi-html branch July 17, 2026 17:43
@ulises-jeremiasulises-jeremias mentioned this pull request Jul 17, 2026
2 tasks
Sign up for freeto 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

@ulises-jeremias