Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(help), prevent unintended coloring in option descriptions #9284

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

davidfirst
Copy link
Member

This PR fixes an issue where parts of the flag descriptions in the help output were being colored green unintentionally. Specifically, hyphenated words within descriptions (e.g., task-name, task-aspect-id) were partially colored as if they were command-line options.

The following has been done to fix it:

  • Modified the regular expression to only match standalone options at the beginning of each line.
  • Ensured that hyphens within words in the descriptions are not matched and colored.
  • The updated regex checks that the option is either at the start of the string or preceded by a non-alphanumeric character, preventing matches within words.

@davidfirst davidfirst merged commit 475e342 into master Nov 1, 2024
11 checks passed
@davidfirst davidfirst deleted the fix-help-green-description branch November 1, 2024 18:14
Sign up for free to 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.

2 participants