Repository navigation
Cannot make soft_break work #653
Answered
by
colinodell
pherrymason
asked this question in
Q&A
|
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 |
Answered by
colinodell
Mar 1, 2018
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); |
0 replies
Answer selected by
colinodell
|
oh ok, now I understand how to use it. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: