Skip to content

[PR #1543] Strip color codes from ascii art line length calculations #191

@suparious

Description

@suparious

Migrated from Original PR

Original PR: dylanaraps#1543
Author: @Syphist
Branch: master
Changes: +27/-3 lines


Original Description

Description

This removes color and formatting codes from the line length calculation to allow for more control over custom ascii art. This would also fix issues I found when attempting to use the patch in dylanaraps#1220.

Features

Allows for support for finer control of ascii art using escapes such as "[38;5;39m" for defining coloring and formatting in the terminal.

Issues

None that I have found

TODO

Nothing

Fixed Issues

This so far only works if you directly paste the character for \033 or "^[" into the file. I was unable to get it to work for both.


This issue was automatically migrated from the archived dylanaraps/neofetch repository.
The code from the original PR can be cherry-picked or the author can submit a new PR to this fork.

Metadata

Metadata

Assignees

No one assigned

    Labels

    from-upstream-prMigrated from original dylanaraps/neofetch PRhas-codePR with code ready to review/merge

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions