Fix PHP generation script. This resolves bug 1946

pull/16/head
Michele Calgaro 11 years ago
parent 0b621eebc8
commit d0c4804783

@ -1,3 +1,5 @@
#!/usr/bin/perl
# This perl script read stdin and write on stdout. It shall be an XML language file. # 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)' # * If the name of the language is 'HTML', then it creates the language 'PHP (HTML)'
@ -48,7 +50,7 @@ else
$findphp = "<context name=\"FindPHP\">\n<RegExpr context=\"##PHP/PHP\" String=\"&lt;\\?(?:=|php)?\" lookAhead=\"true\" />\n</context>\n"; $findphp = "<context name=\"FindPHP\">\n<RegExpr context=\"##PHP/PHP\" String=\"&lt;\\?(?:=|php)?\" lookAhead=\"true\" />\n</context>\n";
$file =~ s/<IncludeRules\s([^>]*)context="##(?!Alerts)([^"]+)"/<IncludeRules $1context="##$2\/PHP"/g; $file =~ s/<IncludeRules\s([^>]*)context="##(?!Alerts|Doxygen|Modelines)([^"]+)"/<IncludeRules $1context="##$2\/PHP"/g;
$file =~ s/(<context\s[^>]*>)/$1\n<IncludeRules context="FindPHP" \/>/g; $file =~ s/(<context\s[^>]*>)/$1\n<IncludeRules context="FindPHP" \/>/g;
$file =~ s/(?=<\/contexts\s*>)/$findphp/; $file =~ s/(?=<\/contexts\s*>)/$findphp/;

Loading…
Cancel
Save