Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Markdown.php

function Markdown::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 Markdown::printTextBlock()
Markdown::processSniff in vendor/squizlabs/php_codesniffer/src/Generators/Markdown.php
Process the documentation for a single sniff.

File

vendor/squizlabs/php_codesniffer/src/Generators/Markdown.php, line 111

Class

Markdown

Namespace

PHP_CodeSniffer\Generators

Code

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);
    $content = str_replace('<em>', '*', $content);
    $content = str_replace('</em>', '*', $content);
    echo $content . PHP_EOL;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal