Browse Source

Fixs edge case where single stars on succeeding lines are wrongly turned into multi-line <em>

pull/2990/head
Hypolite Petovan 4 years ago
parent
commit
d0cb8cdccf
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      include/bb2diaspora.php

+ 3
- 0
include/bb2diaspora.php View File

@ -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…
Cancel
Save