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:
@@ -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>");
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1074,6 +1074,9 @@ class Parsedown
|
||||
'element' => array(
|
||||
'name' => 'code',
|
||||
'text' => $text,
|
||||
'attributes' => array(
|
||||
'class' => 'inline-code'
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user