You are here

protected function MarkdownExtra::hashHTMLBlocks in Express 8

* Hashify HTML Blocks and "clean tags". * * We only want to do this for block-level HTML tags, such as headers, * lists, and tables. That's because we still want to wrap <p>s around * "paragraphs" that are wrapped in non-block-level tags, such as anchors, * phrase emphasis, and spans. The list of tags we're looking for is * hard-coded. * * This works by calling _HashHTMLBlocks_InMarkdown, which then calls * _HashHTMLBlocks_InHTML when it encounter block tags. When the markdown="1" * attribute is found within a tag, _HashHTMLBlocks_InHTML calls back * _HashHTMLBlocks_InMarkdown to handle the Markdown syntax within the tag. * These two functions are calling each other. It's recursive! *

Parameters

string $text: * @return string

Overrides Markdown::hashHTMLBlocks

File

vendor/michelf/php-markdown/Michelf/MarkdownExtra.php, line 340

Class

MarkdownExtra
Markdown Extra Parser Class

Namespace

Michelf

Code

protected function hashHTMLBlocks($text) {
  if ($this->no_markup) {
    return $text;
  }

  // Call the HTML-in-Markdown hasher.
  list($text, ) = $this
    ->_hashHTMLBlocks_inMarkdown($text);
  return $text;
}