You are here

protected function Markdown::_doHeaders_callback_atx in Express 8

* ATX header parsing callback *

Parameters

array $matches: * @return string

1 method overrides Markdown::_doHeaders_callback_atx()
MarkdownExtra::_doHeaders_callback_atx in vendor/michelf/php-markdown/Michelf/MarkdownExtra.php
* Callback for atx headers *

File

vendor/michelf/php-markdown/Michelf/Markdown.php, line 962

Class

Markdown
Markdown Parser Class

Namespace

Michelf

Code

protected function _doHeaders_callback_atx($matches) {

  // ID attribute generation
  $idAtt = $this
    ->_generateIdFromHeaderValue($matches[2]);
  $level = strlen($matches[1]);
  $block = "<h{$level}{$idAtt}>" . $this
    ->runSpanGamut($matches[2]) . "</h{$level}>";
  return "\n" . $this
    ->hashBlock($block) . "\n\n";
}