mirror of
https://github.com/friendica/friendica
synced 2024-12-23 08:40:16 +00:00
Normalize line endings instead of adding <br> before Markdown()
This commit is contained in:
parent
3fa4605ace
commit
2310bf994a
1 changed files with 2 additions and 2 deletions
|
@ -39,9 +39,9 @@ function diaspora2bb($s) {
|
|||
$s = html_entity_decode($s, ENT_COMPAT, 'UTF-8');
|
||||
|
||||
// Handles single newlines
|
||||
$s = str_replace("\r", '<br>', $s);
|
||||
|
||||
$s = str_replace("\r\n", "\n", $s);
|
||||
$s = str_replace("\n", " \n", $s);
|
||||
$s = str_replace("\r", " \n", $s);
|
||||
|
||||
// Replace lonely stars in lines not starting with it with literal stars
|
||||
$s = preg_replace('/^([^\*]+)\*([^\*]*)$/im', '$1\*$2', $s);
|
||||
|
|
Loading…
Reference in a new issue