From: paul Date: Fri, 4 Nov 2016 13:23:10 +0000 (+0000) Subject: dirty fix: do not mess up with empty tags X-Git-Url: https://git.plutz.net/?p=confetti;a=commitdiff_plain;h=9d6e65a0055304b62e0b2c9502da3443fb82ad33 dirty fix: do not mess up with empty tags svn path=/trunk/; revision=135 --- diff --git a/pages/cards.sh b/pages/cards.sh index 106484b..08b88b9 100755 --- a/pages/cards.sh +++ b/pages/cards.sh @@ -142,7 +142,7 @@ vcf_parse() { tag=*) ot='' printf %s "$line" \ | sed -r 's:^tag=::;s:\;([A-Z+_-]+="[^"]+"|[A-Z+_-]+=[^\;]+):\n\1:g;' \ - | sed -r 's:([A-Z+_-]+)="?(.*)"?:tag\[\1\]="\2":g' \ + | sed -rn 's:([A-Z+_-]+)="?(.+)"?:tag\[\1\]="\2":gp' \ | sed -r '/^ *$/d' \ | sort |while read -r tag; do nt="$(printf %s "$tag" |sed -r 's:^tag\[([A-Z+_-]+)\]="(.*)"$:\1:')"