Commit 18bb7cfc authored by David Faure's avatar David Faure

Lower weight for "use strict" and similar in the perl mimetype

Otherwise any "use strict" in an HTML file leads to it being detected as
perl instead of HTML.

https://bugs.kde.org/show_bug.cgi?id=417248
parent 5b342ee0
Pipeline #111732 passed with stage
in 1 minute and 44 seconds
......@@ -3350,13 +3350,13 @@ command to generate the output files.
<match type="string" value='eval \"exec /usr/local/bin/perl' offset="0"/>
<match type="string" value="/bin/perl" offset="2:16"/>
<match type="string" value="/bin/env perl" offset="2:16"/>
<match type="string" value="use strict" offset="0:256"/>
<match type="string" value="use warnings" offset="0:256"/>
<match type="string" value="use diagnostics" offset="0:256"/>
<match type="string" value="use Test::" offset="0:256"/>
<match type="string" value="BEGIN {" offset="0:256"/>
</magic>
<magic priority="40">
<match type="string" value="use strict" offset="0:256"/>
<match type="string" value="use warnings" offset="0:256"/>
<match type="string" value="use diagnostics" offset="0:256"/>
<match type="string" value="\n=pod" offset="0:256"/>
<match type="string" value="\n=head1 NAME" offset="0:256"/>
<match type="string" value="\n=head1 DESCRIPTION" offset="0:256"/>
......
......@@ -88,6 +88,8 @@ test.xht application/xhtml+xml
test-html-with-svg.html text/html
# Copied from https://gitlab.freedesktop.org/xdg/shared-mime-info/issues/98
test-really-html-not-xhtml.html text/html oxx
# Copied from https://bugs.kde.org/show_bug.cgi?id=417248
test-really-html-not-perl.html text/html
# Copied from https://gitlab.freedesktop.org/xdg/shared-mime-info/issues/120
test.html text/html
# Copied from http://cvs.fedoraproject.org/viewvc/comps/comps-f11.xml.in?revision=1.306
......
<html>
<head>
<title></title>
<meta content="use strict">
</head>
<body></body>
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment