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

Highlight text within backticks when listing recipes #2423

Merged
merged 7 commits into from
Nov 9, 2024

Conversation

neunenak
Copy link
Contributor

@neunenak neunenak commented Oct 9, 2024

@casey
Copy link
Owner

casey commented Oct 10, 2024

Seems reasonable! Needs some tests though. Should definitely test edge cases, like an unclosed backtick, etc.

@casey
Copy link
Owner

casey commented Nov 9, 2024

I could not wrap my head around what split_inclusive was doing, so I replaced it with a regex. This also avoids color codes sometimes when they aren't needed.

@casey casey enabled auto-merge (squash) November 9, 2024 19:05
@casey casey disabled auto-merge November 9, 2024 19:05
@casey casey enabled auto-merge (squash) November 9, 2024 19:05
@casey casey merged commit 1ae6a6d into casey:master Nov 9, 2024
5 checks passed
@laniakea64
Copy link
Contributor

Although this type of highlighting could be nice in theory, the chosen color makes it only worse. The white backtick color stands out too much relative to...everything else in the output, to the point of making just --list output a struggle to read. It's especially distracting in the auto-generated descriptions for aliases.

Was going to check whether changing the backtick highlight to bright blue (0;94) would resolve this while still standing out enough, but can't figure out how to specify bright blue in this part of just code?

@casey
Copy link
Owner

casey commented Nov 17, 2024

It looks okay for me, but that's probably just my color theme. I can kinda see how it stands out too much See below. Can you post a screenshot of what it looks like for you?

Screenshot 2024-11-16 at 4 10 50 PM

Cyan might be a good choice, since it goes with blue and is bright. It's the same color used for parameters, but that seems fine, and sometimes you use backticks in doc comments to call out what parameters do:

Screenshot 2024-11-16 at 4 15 29 PM

@casey
Copy link
Owner

casey commented Nov 17, 2024

Changed the color to cyan in #2469. Hopefully that looks good in more color schemes!

@laniakea64
Copy link
Contributor

It looks okay for me, but that's probably just my color theme.

In your color scheme it would be fine for me too.

Can you post a screenshot of what it looks like for you?

Sure.

White -

Screen shot 2024-11-17 1

Cyan -

Screen shot 2024-11-17 2

The cyan is much better, thanks!

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.

3 participants