]> www.wagner.pp.ru Git - fiction/Kate-the-Empress.git/commitdiff
Fix new perl warnings
authorVictor Wagner <vitus@wagner.pp.ru>
Mon, 17 Jul 2017 18:17:07 +0000 (21:17 +0300)
committerVictor Wagner <vitus@wagner.pp.ru>
Mon, 17 Jul 2017 18:17:07 +0000 (21:17 +0300)
Tex2fb2

diff --git a/Tex2fb2 b/Tex2fb2
index 96279b391b0062e4b4afdb8b8e21ceddb3366ecd..9ed9dd93299d5c906fbac8ffe03bf9dbf4103947 100755 (executable)
--- 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("<empty-line />");
        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+|{})([^{}]+)}/<emphasis>$2<\/emphasis>/g;
-       s/\\(emph|textit|textbf){([^{}]+)}/<emphasis>$2<\/emphasis>/g;
-       s/\\footnote{(.*)}/push_footnote($1)/e;
+       s/\{\\(em|it|bf)(?:\s+|\{\})([^{}]+)\}/<emphasis>$2<\/emphasis>/g;
+       s/\\(emph|textit|textbf)\{([^{}]+)\}/<emphasis>$2<\/emphasis>/g;
+       s/\\footnote\{(.*)\}/push_footnote($1)/e;
        s/[{}]//g;
        return $_;
 }