File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -3418,17 +3418,8 @@ image_backend() {
3418
3418
}
3419
3419
3420
3420
get_ascii () {
3421
- if [[ ! -f " $image_source " ||
3422
- " $image_source " =~ ^(auto| ascii)$ ||
3423
- " $image_source " =~ \. (png| jpg| jpe| jpeg| gif)$ ]]; then
3424
-
3425
- # Fallback to distro ascii mode if custom ascii isn't found.
3426
- [[ ! " $image_source " =~ ^(auto| ascii)$ ]] && \
3427
- err " Ascii: Ascii file not found, using distro ascii."
3428
-
3429
- # Fallback to distro ascii mode if source is an image.
3430
- [[ " $image_source " =~ \. (png| jpg| jpe| jpeg| gif)$ ]] && \
3431
- err " Image: Source is image file but ascii backend was selected. Using distro ascii."
3421
+ if [[ ! -f " $image_source " ]]; then
3422
+ err " Ascii: Ascii file not found, using distro ascii."
3432
3423
else
3433
3424
ascii_data=" $( < " $image_source " ) "
3434
3425
fi
@@ -3458,10 +3449,7 @@ get_ascii() {
3458
3449
print=" ${print// ' ${c5}' / $c5 } "
3459
3450
print=" ${print// ' ${c6}' / $c6 } "
3460
3451
3461
- # Overwrite padding if ascii_length_force is set.
3462
- [[ " $ascii_length_force " ]] && ascii_length=" $ascii_length_force "
3463
-
3464
- text_padding=" $(( ascii_length + gap)) "
3452
+ (( text_padding= ascii_length+ gap))
3465
3453
printf " %b" " $print "
3466
3454
LC_ALL=C
3467
3455
}
You can’t perform that action at this time.
0 commit comments