mirror of
https://github.com/friendica/friendica
synced 2024-11-10 09:02:53 +00:00
Fixs edge case where single stars on succeeding lines are wrongly turned into multi-line <em>
This commit is contained in:
parent
60b9203dd5
commit
d0cb8cdccf
1 changed files with 3 additions and 0 deletions
|
@ -22,6 +22,9 @@ function diaspora2bb($s) {
|
|||
|
||||
$s = str_replace("\n", " \n", $s);
|
||||
|
||||
// Replace lonely stars in lines not starting with it with literal stars
|
||||
$s = preg_replace('/^([^\*]+)\*([^\*]*)$/im', '$1\*$2', $s);
|
||||
|
||||
// The parser cannot handle paragraphs correctly
|
||||
$s = str_replace(array('</p>', '<p>', '<p dir="ltr">'), array('<br>', '<br>', '<br>'), $s);
|
||||
|
||||
|
|
Loading…
Reference in a new issue