From 314820a5bfd62905a3ef504ce990c6143bbc05c3 Mon Sep 17 00:00:00 2001 From: Victor Wagner Date: Mon, 17 Jul 2017 21:17:07 +0300 Subject: [PATCH] Fix new perl warnings --- Tex2fb2 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 $_; } -- 2.39.5