Here is a sample XML:
<x:stylesheet xmlns:x="http://www.w3.org/1999/XSL/Transform" version="1.0">
<x:template match="1">
<x:if test="2">
<![CDATA[
<?php
return ob_get_clean();
}]]>
</x:if>
<x:if test="3">
<![CDATA[
<?php
return ob_get_clean();
}]]>
</x:if>
</x:template>
</x:stylesheet>
And I've attached the SciTE image that shows formatting: as you can se, it is wrong.
Wrong formatting demo
It is unclear what you want here since your PHP sections are not terminated. I will not be working on this.
The priority field on tracker issues is for use by maintainers and should not be set by reporters.
> It is unclear what you want here since your PHP sections are not
terminated. I will not be working on this.
If the file extension is PHP then PHP syntax takes precedence. But this is XSL/XML file (with xsl extension) so the XML syntax is high priority here.
> ... so the XML syntax is high priority here.
Exactly. The above code is a well-formed XML, and from XML's point of view the `<?` character sequence inside a CDATA block shall not be interpreted as a processing instruction. Whether <?php is closed or not is irrelevant here. The same problem can be seen in the following code:
<a><![CDATA[ <? ]]></a>
being a valid XML, the syntax highlighting stops at the <?, although it should not.
Kind bump as still an issue in 2017 (see Notepad++ issue 2898).
Can be reproduced with:
- Notepad++ v7.3.2 using Scintilla v3.7.2;
- SCiTE v3.7.2.
It will complete 10 (ten) years in the next month that the issue was raised and I continue to see the same problem in NotePad++. See Notepad++ issue 2898.
Reproduced with:
-Notepad++ v.7.5.1
Maybe an option to turn off PHP inspecting can be added.
Fixed by https://github.com/ScintillaOrg/lexilla/issues/252