diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-05-29 17:06:45 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-05-29 17:06:45 -0400 |
commit | 3e6af5c87692b5dbefd59d7b2350670d4e1cb3a4 (patch) | |
tree | 62ea2191cfe5ff4aeed55211a82dae3de0859eac /library | |
parent | 75b169f391d7d6a5c140e74603e87897b39e8344 (diff) | |
download | volse-hubzilla-3e6af5c87692b5dbefd59d7b2350670d4e1cb3a4.tar.gz volse-hubzilla-3e6af5c87692b5dbefd59d7b2350670d4e1cb3a4.tar.bz2 volse-hubzilla-3e6af5c87692b5dbefd59d7b2350670d4e1cb3a4.zip |
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.
Diffstat (limited to 'library')
-rw-r--r-- | library/markdown.php | 2 | ||||
-rw-r--r-- | library/parsedown/Parsedown.php | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/library/markdown.php b/library/markdown.php index f548fc26c..0e3275ff2 100644 --- a/library/markdown.php +++ b/library/markdown.php @@ -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>"); } diff --git a/library/parsedown/Parsedown.php b/library/parsedown/Parsedown.php index 5edd44843..7b920d730 100644 --- a/library/parsedown/Parsedown.php +++ b/library/parsedown/Parsedown.php @@ -1074,6 +1074,9 @@ class Parsedown 'element' => array( 'name' => 'code', 'text' => $text, + 'attributes' => array( + 'class' => 'inline-code' + ), ), ); } |