🐛 fix(titles): handle multi-word prog names in group titles#289
Merged
gaborbernat merged 1 commit intotox-dev:mainfrom Mar 2, 2026
Merged
🐛 fix(titles): handle multi-word prog names in group titles#289gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat merged 1 commit intotox-dev:mainfrom
Conversation
4f99f82 to
0f3c0e1
Compare
Programs with spaces in their prog (e.g. `python -m build`) had their group titles corrupted because the title-building code split on spaces to separate the prog name from subcommands. Now uses the actual root prog length to find the subcommand portion. Fixes tox-dev#68
0f3c0e1 to
8773eeb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Programs with spaces in their
prog(e.g.python -m build) had their section titles and group headings corrupted. 🐛 The title-building logic naively splitprogon whitespace to separate the program name from subcommand names, sopython -m buildwas interpreted as prog=pythonwith subcommand-m— producing nonsensical headings.The fix threads the actual root
progvalue through the title-building methods and uses its length to correctly locate the subcommand portion, rather than assumingprogis always a single word. This preserves existing behavior for single-word programs while correctly handling multi-word ones likepython -m build.Fixes #68