]> git.lyx.org Git - lyx.git/blobdiff - development/autotests/lyxStatus.pm
findadv: almost all test cases, including \regex[{}, back to working with std::regex.
[lyx.git] / development / autotests / lyxStatus.pm
index ef18c897bb2854ada818ed5eedcd5075d71f1f5b..7707cec402d25722642680b1861450320bcd7dce 100644 (file)
@@ -207,7 +207,7 @@ sub checkForHeader($)
                             "filetype" => "replace_only",
                             "result" => ["\\font_$ff \"", $rFont->{$ff}, '"']);
        # fontentry of type '\font_roman "default" "default"'
-       my $elem2 = newMatch("search" => '^\\\\font_' . $ff . '\s+"(.*)"\s+"(.*)"\s*$',
+       my $elem2 = newMatch("search" => '^\\\\font_' . $ff . '\s+"(.*)"\s+"default"\s*$',
                             "filetype" => "replace_only",
                             "result" => ["\\font_$ff ", '"', "1", '" "', $rFont->{$ff}, '"']);
        push(@rElems, $elem, $elem1, $elem2);
@@ -242,7 +242,12 @@ sub checkForPreamble($)
                          "search" => '^\\\\(photo|ecvpicture)(.*\{)(.*)\}',
                          "fileidx" => 3,
                          "result" => ["\\", "1", "2", "3", "}"]);
-    setMatching([$rElem]);
+    #
+    # Remove comments from preamble
+    my $comments = newMatch("search" => '^([^%]*)([%]+)([^%]*)$',
+                           "filetype" => "replace_only",
+                           "result" => ["1", "2"]);
+    setMatching([$rElem, $comments]);
     return(1);
   }
   return(0);