<parsedown inline="true">will parse markdown between the tags</parsedown>
This commit is contained in:
parent
6e6bae7e1d
commit
8d052192f7
@ -3,6 +3,21 @@
|
||||
class ParsedownHelper extends \Prefab {
|
||||
|
||||
static public function render($args) {
|
||||
|
||||
if(isset($args['@attrib']) && $args['@attrib']['inline'] === 'true'){
|
||||
|
||||
$return = \Parsedown::instance()->text($args[0]);
|
||||
|
||||
return '
|
||||
<div class="content">
|
||||
<parsedown_rendered>'.$return.'</parsedown_rendered>
|
||||
</div>
|
||||
';
|
||||
|
||||
}
|
||||
|
||||
return '<pre>'.print_r($args,1).'<pre>';
|
||||
|
||||
$content = $args[0];
|
||||
$content_token = \Template::instance()->token($content);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user