Hacked Parsedown and Markdown to add class inline-code to <code> blocks for proper inline code rendering. Stopped using Parsedown even though Markdown is slower, hence extra delay when previewing pages.

This commit is contained in:
Andrew Manning
2016-05-29 17:06:45 -04:00
parent 75b169f391
commit 3e6af5c876
5 changed files with 28 additions and 6 deletions

View File

@@ -1136,7 +1136,7 @@ class Markdown_Parser {
# Create a code span markup for $code. Called from handleSpanToken.
#
$code = htmlspecialchars(trim($code), ENT_NOQUOTES);
return $this->hashPart("<code>$code</code>");
return $this->hashPart("<code class=\"inline-code\">$code</code>");
}

View File

@@ -1074,6 +1074,9 @@ class Parsedown
'element' => array(
'name' => 'code',
'text' => $text,
'attributes' => array(
'class' => 'inline-code'
),
),
);
}