Kate syntax: allow PHP heredoc closing identifiers to be idented

It is allowed syntax since PHP version 7.3.0.

See https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/267/head
Mavridis Philippe 7 months ago committed by TDE Gitea
parent 43e38f2c0a
commit b1fd9e80b3

@ -5542,27 +5542,27 @@ Changes:
<DetectChar attribute="String" context="#pop" char="'" /> <DetectChar attribute="String" context="#pop" char="'" />
</context> </context>
<context name="htmlheredoc" attribute="Normal Text" lineEndContext="#stay" dynamic="true"> <context name="htmlheredoc" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<RegExpr attribute="Backslash Code" context="#pop" String="^%1;?$" dynamic="true" endRegion="Heredoc" /> <RegExpr attribute="Backslash Code" context="#pop" String="^[\s]*%1;?$" dynamic="true" endRegion="Heredoc" />
<IncludeRules context="commonheredoc" /> <IncludeRules context="commonheredoc" />
<IncludeRules context="##HTML" /> <IncludeRules context="##HTML" />
</context> </context>
<context name="cssheredoc" attribute="Normal Text" lineEndContext="#stay" dynamic="true"> <context name="cssheredoc" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<RegExpr attribute="Backslash Code" context="#pop" String="^%1;?$" dynamic="true" endRegion="Heredoc" /> <RegExpr attribute="Backslash Code" context="#pop" String="^[\s]*%1;?$" dynamic="true" endRegion="Heredoc" />
<IncludeRules context="commonheredoc" /> <IncludeRules context="commonheredoc" />
<IncludeRules context="##CSS" /> <IncludeRules context="##CSS" />
</context> </context>
<context name="mysqlheredoc" attribute="Normal Text" lineEndContext="#stay" dynamic="true"> <context name="mysqlheredoc" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<RegExpr attribute="Backslash Code" context="#pop" String="^%1;?$" dynamic="true" endRegion="Heredoc" /> <RegExpr attribute="Backslash Code" context="#pop" String="^[\s]*%1;?$" dynamic="true" endRegion="Heredoc" />
<IncludeRules context="commonheredoc" /> <IncludeRules context="commonheredoc" />
<IncludeRules context="##SQL (MySQL)" /> <IncludeRules context="##SQL (MySQL)" />
</context> </context>
<context name="javascriptheredoc" attribute="Normal Text" lineEndContext="#stay" dynamic="true"> <context name="javascriptheredoc" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<RegExpr attribute="Backslash Code" context="#pop" String="^%1;?$" dynamic="true" endRegion="Heredoc" /> <RegExpr attribute="Backslash Code" context="#pop" String="^[\s]*%1;?$" dynamic="true" endRegion="Heredoc" />
<IncludeRules context="commonheredoc" /> <IncludeRules context="commonheredoc" />
<IncludeRules context="Normal##JavaScript" /> <IncludeRules context="Normal##JavaScript" />
</context> </context>
<context name="heredoc" attribute="String" lineEndContext="#stay" dynamic="true"> <context name="heredoc" attribute="String" lineEndContext="#stay" dynamic="true">
<RegExpr attribute="Backslash Code" context="#pop" String="^%1;?$" dynamic="true" endRegion="Heredoc" /> <RegExpr attribute="Backslash Code" context="#pop" String="^[\s]*%1;?$" dynamic="true" endRegion="Heredoc" />
<IncludeRules context="commonheredoc" /> <IncludeRules context="commonheredoc" />
</context> </context>
<context name="commonheredoc" attribute="String" lineEndContext="#stay"> <context name="commonheredoc" attribute="String" lineEndContext="#stay">

Loading…
Cancel
Save