Is it possible to create more than one linebreak in the Visual Markdown Editor?
sentence 1
sentence 2
sentence 3
sentence 4
When I enter this in the editor, it outputs;
sentence 1
sentence 2
sentence 3
sentence 4
I tried this in config.php
>>> c::set('markdown.breaks', true);
but that didn’t work (also tried to end double spaces after an empty line).
Nothing worked, so I ended up with a custom tag (br:#)
Which will output the amount of hard returns specified in the tag;
sentence 1
(br:1)
sentence 2
(br:2)
sentence 3
(br:3)
sentence 4
kirbytext::$tags['br'] = array(
'html' => function($tag)
{
$br = $tag->attr('br');
$break = '';
$i = 1;
if(!is_numeric($br)){$br = 1;}
while ($i <= $br)
{
$i++;
$break .= '<p> </p>';
}
return $break;
}
);
I also asked this question on the GitHub page - but I am not sure this is an issue, or “by design” - so I asked it here again…