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

feat: style ranges #458

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

feat: style ranges #458

wants to merge 4 commits into from

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Jan 7, 2025

Extracted from charmbracelet/gum#789 , this allows to style ranges of a given string without breaking its current styles.

The resulting ansi sequences aren't that beautiful (as there might be many styles+reset with nothing in them), but it works. We can optimize this later I think.

Also: maybe better waiting for lipgloss v2 and do it there instead. This does not handle renderers for example.

Extracted from charmbracelet/gum#789 , this
allows to style ranges of a given string without breaking its current
styles.

The resulting ansi sequences aren't that beautiful (as there might be
many styles+reset with nothing in them), but it works. We can optimize
this later I think.
@caarlos0 caarlos0 self-assigned this Jan 7, 2025
ranges.go Outdated Show resolved Hide resolved
ranges.go Outdated Show resolved Hide resolved
ranges.go Outdated Show resolved Hide resolved
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.

4 participants