]> git.plutz.net Git - lobster/commitdiff
Improved line breaking hack for addresses
authorPaul Hänsch <paul@plutz.net>
Tue, 10 Dec 2019 03:37:11 +0000 (04:37 +0100)
committerPaul Hänsch <paul@plutz.net>
Tue, 10 Dec 2019 03:37:11 +0000 (04:37 +0100)
cards/widgets.sh

index a3836bf17fd016aae72a486c777e687e766e4925..35086eb6abb4e7cd3d8c857840f9337502ed9214 100755 (executable)
@@ -133,9 +133,10 @@ card_item(){
         done
         ;;
       *)[ $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 |unescape |HTML)"
+                 "$(pdi_value "$card" "$item" $c |sed -r "s;(straße|weg|damm|allee|ufer);${shy}\1;g" |unescape |HTML)"
         done
         ;;
     esac