From: Victor Wagner Date: Mon, 17 Jul 2017 18:17:07 +0000 (+0300) Subject: Fix new perl warnings X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=314820a5bfd62905a3ef504ce990c6143bbc05c3;p=fiction%2FKate-the-Empress.git Fix new perl warnings --- diff --git a/Tex2fb2 b/Tex2fb2 index 96279b3..9ed9dd9 100755 --- a/Tex2fb2 +++ b/Tex2fb2 @@ -75,7 +75,7 @@ if ((/^$/ || $environ) && $buffer) { } next LINE if $environ; # Section headings -if (/\\(part|chapter|section|subsection|subsubsection)\*?{(.*)}/) { +if (/\\(part|chapter|section|subsection|subsubsection)\*?\{(.*)\}/) { if ($buffer) { add_to_section(tag(flushbuffer($buffer),$poetry?"stanza":"p")); $buffer=""; @@ -83,7 +83,7 @@ if (/\\(part|chapter|section|subsection|subsubsection)\*?{(.*)}/) { pushsection($1,tag($2,"p")); next LINE; } -if (/\\vspace{/) { +if (/\\vspace\{/) { add_to_section(""); next LINE; } @@ -101,7 +101,7 @@ s/([^\\])%.*$/$1/; s/^%.*$//; # strip \sloppy s/\\sloppy\s+//g; -s/\\sloppy{}//g; +s/\\sloppy\{\}//g; s/\\sloppy([^\w])/$1/g; # strip extra space s/^\s+//; @@ -128,7 +128,7 @@ if ($poetry) { $poetic_buffer=$_; next LINE; } - s/\\footnote{(.*)}/push_footnote($1)/e; + s/\\footnote\{(.*)\}/push_footnote($1)/e; s/\s*\\\\$//; $buffer.=tag($_,'v')."\n"; } elsif ($verbatim) { @@ -206,9 +206,9 @@ sub tag { sub flushbuffer { local $_ = shift; - s/{\\(em|it|bf)(?:\s+|{})([^{}]+)}/$2<\/emphasis>/g; - s/\\(emph|textit|textbf){([^{}]+)}/$2<\/emphasis>/g; - s/\\footnote{(.*)}/push_footnote($1)/e; + s/\{\\(em|it|bf)(?:\s+|\{\})([^{}]+)\}/$2<\/emphasis>/g; + s/\\(emph|textit|textbf)\{([^{}]+)\}/$2<\/emphasis>/g; + s/\\footnote\{(.*)\}/push_footnote($1)/e; s/[{}]//g; return $_; }