From: Paul Hänsch Date: Sat, 6 Feb 2021 23:18:54 +0000 (+0100) Subject: insert optional line break in long street names X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=625d391932052a4d1514c754b1262b5791207474;p=confetti insert optional line break in long street names --- diff --git a/cards/widgets.sh b/cards/widgets.sh index c0c0594..463a648 100755 --- a/cards/widgets.sh +++ b/cards/widgets.sh @@ -167,6 +167,13 @@ card_item(){ "$(pdi_value "$card" TEL $c |unescape |HTML)" done ;; + ADR)[ $cnt -gt 0 ] && printf '[h3 %s]' "$(l10n "$item")" + shy="$(printf '\302\255')" + seq 1 $cnt |while read c; do + printf '[span .item .%s . %s]' "$item" \ + "$(pdi_value "$card" "$item" $c |sed -r "s;(straße|weg|damm|allee|ufer);${shy}\1;g" |unescape |HTML)" + done + ;; *)[ $cnt -gt 0 ] && printf '[h3 %s]' "$(l10n "$item")" seq 1 $cnt |while read c; do printf '[span .item .%s . %s]' "$item" \