diff --git a/data/generators/generate-php.pl b/data/generators/generate-php.pl index 943c055..c8274aa 100755 --- a/data/generators/generate-php.pl +++ b/data/generators/generate-php.pl @@ -1,58 +1,58 @@ #!/usr/bin/perl # This perl script read stdin and write on stdout. It shall be an XML language file. # # * If the name of the language is 'HTML', then it creates the language 'PHP (HTML)' # which shall be used for PHP hl. # # * If the name of the language is something else (say '*'), it creates the language '*/PHP'. # This new language is the same as the old one, but is able to detect PHP everywhere. # # This script will correctly set extensions & mimetype, and will replace # by # # Generated languages need a language named 'PHP/PHP', which shall take care of PHP hl itself # and which will be called every time something like # License: LGPL my $file = ""; while (<>) { $file .= $_; } $warning = "\n\n\n"; $file =~ s/(?=]+name="HTML"/) { $root = 1; } if ($root == 1) { $file =~ s/]+)name="[^"]*"/]+)section="[^"]*"/]+)extensions="[^"]*"/]+)extensions="[^"]*"/]+)mimetype="[^"]*"/]+)name="([^"]*)"/