Cannot make soft_break work #653
-
I'm trying to make this text to add a This is the text I'm trying to convert:
I've tried using the default options and both forcing it:
It gets converted to this:
Maybe I didn't understand properly the meaning of |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Per the CommonMark spec, soft breaks do not render as This library does have a configuration option you can change to Try making using this instead: $converter = new CommonMarkConverter([
'renderer' => [
'soft_break' => '<br>',
]
]);
return $converter->convertToHtml($html); |
Beta Was this translation helpful? Give feedback.
-
oh ok, now I understand how to use it. |
Beta Was this translation helpful? Give feedback.
Per the CommonMark spec, soft breaks do not render as
<br>
tags by default.This library does have a configuration option you can change to
'<br>'
to get that functionality: https://commonmark.thephpleague.com/configuration/Try making using this instead: