1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

gen_stub: break up closing tag in DOMCdataSection

Otherwise GitHub's syntax highlighting treats it as the end of the code and
stops highlighting
This commit is contained in:
Daniel Scherzer
2025-03-16 21:08:18 -07:00
committed by DanielEScherzer
parent c6a9beebff
commit 4527bafad0

View File

@@ -1975,12 +1975,16 @@ ENDCOMMENT
$prog = $doc->createElement('programlisting');
$prog->setAttribute('role', 'php');
// So that GitHub syntax highlighting doesn't treat the closing tag
// in the DOMCdataSection as indication that it should stop syntax
// highlighting, break it up
$empty = '';
$code = new DOMCdataSection(
<<<CODE_EXAMPLE
<?php
echo "Code example";
?>
?$empty>
CODE_EXAMPLE
);