Hey there,
I see how my question might be related to this post, however …
So far I tried extending Parsedown like mentioned here with:
class Extension extends Parsedown
{
#
# Fenced Code
protected function blockFencedCode($Line)
{
if (preg_match('/^['.$Line['text'][0].']{3,}[ ]*([\w-]+)?[ ]*$/', $Line['text'], $matches))
{
$Element = array(
'name' => 'code',
'text' => '',
);
if (isset($matches[1]))
{
$class = 'language-'.$matches[1].' hljs';
$Element['attributes'] = array(
'class' => $class,
);
}
$Block = array(
'char' => $Line['text'][0],
'element' => array(
'name' => 'pre',
'handler' => 'element',
'text' => $Element,
),
);
return $Block;
}
}
}
after enabling parsedown extra I tried using this parsedown extra plugin to achieve what I want: besides the language-[name-of-language]
class I want to add anothe one, quick and painless.
Any ideas are appreciated!
Cheers.