Skip to content

Hyperlink support #6

Open
Open
@diamondburned

Description

@diamondburned

Right now, go-ansi-parser's ansi.Length includes the URL part of a terminal hyperlink. This makes the line count super long even when it's visibly just a small piece of text.

ansi.Length should ideally only return the visible text component of a hyperlink.

Example:

For string:

"\x1b[33;1mSource Code: \x1b[0m\x1b]8;;https://libdb.so/libdb.so\x1b\\diamondburned/libdb.so\x1b]8;;\x1b\\"

ansi.Length(str) should return 35 (probably maybe?), but it currently returns 74.

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