ascii: Strip esc chars when calculating length. Closes #942
This commit is contained in:
parent
f25b76a0a5
commit
4083770a6b
1 changed files with 3 additions and 0 deletions
3
neofetch
3
neofetch
|
@ -2653,6 +2653,9 @@ get_ascii() {
|
|||
print+="$line \n"
|
||||
|
||||
# Calculate size of ascii file in line length / line count.
|
||||
line="${line//[??;?;??m}"
|
||||
line="${line//[??;?;???m}"
|
||||
line="${line//[0m}"
|
||||
line="${line//\$\{??\}}"
|
||||
line="${line//\\\\/\\}"
|
||||
((${#line} > ascii_length)) && ascii_length="${#line}"
|
||||
|
|
Loading…
Reference in a new issue