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:
committed by
DanielEScherzer
parent
c6a9beebff
commit
4527bafad0
@@ -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
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user