add parsedown for markdown-usage in a few cases
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -21,7 +21,11 @@ class FroxlorTwig extends \Twig\Extension\AbstractExtension
|
||||
new \Twig\TwigFilter('idnDecode', array(
|
||||
$this,
|
||||
'idnDecodeFilter'
|
||||
))
|
||||
)),
|
||||
new \Twig\TwigFilter('parsedown', [
|
||||
$this,
|
||||
'callParsedown'
|
||||
])
|
||||
);
|
||||
}
|
||||
|
||||
@@ -100,6 +104,12 @@ class FroxlorTwig extends \Twig\Extension\AbstractExtension
|
||||
return \Froxlor\UI\Panel\UI::getLinker()->getLink($linkopts);
|
||||
}
|
||||
|
||||
public function callParsedown($string)
|
||||
{
|
||||
$pd = new \Parsedown();
|
||||
return $pd->line($string);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* {@inheritdoc}
|
||||
|
||||
Reference in New Issue
Block a user