From 625d391932052a4d1514c754b1262b5791207474 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Sun, 7 Feb 2021 00:18:54 +0100 Subject: [PATCH] insert optional line break in long street names --- cards/widgets.sh | 7 +++++++ 1 file changed, 7 insertions(+) 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" \ -- 2.39.2