You are here

protected function Markdown::makeCodeSpan in Markdown 7

* Create a code span markup for $code. Called from handleSpanToken. *

Parameters

string $code: * @return string

1 call to Markdown::makeCodeSpan()
Markdown::handleSpanToken in includes/Markdown.php
* Handle $token provided by parseSpan by determining its nature and * returning the corresponding value that should replace it. *

File

includes/Markdown.php, line 1232

Class

Markdown
Markdown Parser Class

Namespace

Michelf

Code

protected function makeCodeSpan($code) {
  if ($this->code_span_content_func) {
    $code = call_user_func($this->code_span_content_func, $code);
  }
  else {
    $code = htmlspecialchars(trim($code), ENT_NOQUOTES);
  }
  return $this
    ->hashPart("<code>{$code}</code>");
}