Skip to content

WordWrap support #9

Open
Open
@jippi

Description

@jippi

Hello 👋

First, thank you for an amazingly useful project 🎉

It would be fantastic if there was a WordWrap function that would break up strings by a max-length, but retain the colour stop at EOL and resumed the colouring on the next line when wrapping

(using pseudo-vars rather than ANSI codes directly here)

example := "${BLUE}this is a pretty long string that should ${BOLD}MUST be wrapped${NO_BOLD}${RESET}"

if it was broken up between MUST and be wrapped the ansi would look like this

example := "${BLUE}this is a pretty long string that should ${BOLD}MUST${RESET}\n${BLUE}${BOLD} be wrapped${RESET}"

Basically stopping colouring at WordWrap, and the resume the previous colouring on the 2nd line, to retain colouring and formatting

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions