]> git.plutz.net Git - invoices/commitdiff
handle various forms of html line breaks
authorPaul Hänsch <paul@plutz.net>
Tue, 29 Sep 2020 20:55:13 +0000 (22:55 +0200)
committerPaul Hänsch <paul@plutz.net>
Tue, 29 Sep 2020 20:55:13 +0000 (22:55 +0200)
odtgen.sh

index 5efbcc2887dfb70a346cd1871f5a8dfa07fe79f9..67232a9659cfcda9e465712ec51a9d6edde8634b 100755 (executable)
--- a/odtgen.sh
+++ b/odtgen.sh
@@ -127,13 +127,13 @@ odt_content(){
                </draw:frame><draw:frame draw:style-name="fr2" draw:name="Rahmen2" text:anchor-type="paragraph" svg:width="1.8228in">
                  <draw:text-box fo:min-height="1.8992in">
                    <text:p text:style-name="P5"><!--
-                 -->$(HTML "$sender" |sed -r 's;(&#13\;)?&#10\;;<text:line-break/>;g')<!--
+                 -->$(HTML "$sender" |sed -r 's;(&#13\;)?&#10\;|(&#x0?[Dd]\;)?&#x0?[aA]\;|\r?$;<text:line-break/>;g')<!--
                 --></text:p>
                  </draw:text-box>
                </draw:frame><draw:frame draw:style-name="fr3" draw:name="Rahmen1" text:anchor-type="paragraph" svg:y="1.3799in" svg:width="3.4398in">
                  <draw:text-box fo:min-height="1.3311in">
                    <text:p text:style-name="P3"><!--
-                   -->$(HTML "$client" |sed -r 's;(&#13\;)?&#10\;;<text:line-break/>;g')<!--
+                   -->$(HTML "$client" |sed -r 's;(&#13\;)?&#10\;|(&#x0?[Dd]\;)?&#x0?[aA]\;|\r?$;<text:line-break/>;g')<!--
                   --></text:p>
                  </draw:text-box>
                </draw:frame><text:span text:style-name="T3">Rechnung ${number}</text:span>