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 flag description hyphen incorrectly styled #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gabe565
Copy link

@gabe565 gabe565 commented Aug 7, 2024

When a flag description contains a hyphen, the flag style is incorrectly applied. For example, see the description of the --config flag:
image

This PR changes the flag regex to only match flags when the hyphen is preceded by a space.

Here's the same example after the fix:
image

Fixes #2

@gabe565 gabe565 force-pushed the fix-flag-descriptions branch from a3731db to cadd85f Compare August 7, 2024 08:16
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.

Regex to detect flags can be improved
1 participant