function HTML::printTextBlock
Print a text block found in a standard.
Parameters
\DOMNode $node The DOMNode object for the text block.:
Return value
void
1 call to HTML::printTextBlock()
- HTML::processSniff in vendor/
squizlabs/ php_codesniffer/ src/ Generators/ HTML.php - Process the documentation for a single sniff.
File
-
vendor/
squizlabs/ php_codesniffer/ src/ Generators/ HTML.php, line 226
Class
Namespace
PHP_CodeSniffer\GeneratorsCode
protected function printTextBlock(DOMNode $node) {
$content = trim($node->nodeValue);
$content = htmlspecialchars($content);
// Use the correct line endings based on the OS.
$content = str_replace("\n", PHP_EOL, $content);
// Allow em tags only.
$content = str_replace('<em>', '<em>', $content);
$content = str_replace('</em>', '</em>', $content);
echo " <p class=\"text\">{$content}</p>" . PHP_EOL;
}