You are here

protected function MarkdownExtra::_doHeaders_callback_atx in Express 8

* Callback for atx headers *

Parameters

array $matches: * @return string

Overrides Markdown::_doHeaders_callback_atx

File

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

Class

MarkdownExtra
Markdown Extra Parser Class

Namespace

Michelf

Code

protected function _doHeaders_callback_atx($matches) {
  $level = strlen($matches[1]);
  $defaultId = is_callable($this->header_id_func) ? call_user_func($this->header_id_func, $matches[2]) : null;
  $attr = $this
    ->doExtraAttributes("h{$level}", $dummy =& $matches[3], $defaultId);
  $block = "<h{$level}{$attr}>" . $this
    ->runSpanGamut($matches[2]) . "</h{$level}>";
  return "\n" . $this
    ->hashBlock($block) . "\n\n";
}