summaryrefslogtreecommitdiffstats
path: root/kate
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2014-02-20 23:05:34 +0900
committerSlávek Banko <slavek.banko@axis.cz>2015-12-23 02:22:38 +0100
commit17517c35528d3081ab128bbac26f631e4bf44ea4 (patch)
tree35a1195139aab915ee3d7bf25b2cca52853a3ab1 /kate
parent5547f54b864e0d58a6cc680ec7926bdf2a65cad5 (diff)
downloadtdelibs-17517c35528d3081ab128bbac26f631e4bf44ea4.tar.gz
tdelibs-17517c35528d3081ab128bbac26f631e4bf44ea4.zip
Fix PHP generation script. This resolves bug 1946
(cherry picked from commit d0c48047839da58bfa4ad466cc8c59c6a9cd12ff)
Diffstat (limited to 'kate')
-rw-r--r--kate/data/generate-php.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/kate/data/generate-php.pl b/kate/data/generate-php.pl
index c6bb3a50c..6c885e95b 100644
--- a/kate/data/generate-php.pl
+++ b/kate/data/generate-php.pl
@@ -1,3 +1,5 @@
+#!/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)'
@@ -48,7 +50,7 @@ else
$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/(?=<\/contexts\s*>)/$findphp/;