diff options
author | Simon L'nu <simon.lnu@gmail.com> | 2012-06-28 12:12:43 -0400 |
---|---|---|
committer | Simon L'nu <simon.lnu@gmail.com> | 2012-06-28 12:12:43 -0400 |
commit | 4ae5589df791635549511a90b88422f24170694a (patch) | |
tree | 1dbd867dc2f8aaf2736c087a080e11eaf704ac64 /include/bb2diaspora.php | |
parent | 4f488c7e3cf1a4bc12e83dfdd44ede32283140ac (diff) | |
parent | 26156e1dc4d1f4948e847cd0e5e50304ef643b25 (diff) | |
download | volse-hubzilla-4ae5589df791635549511a90b88422f24170694a.tar.gz volse-hubzilla-4ae5589df791635549511a90b88422f24170694a.tar.bz2 volse-hubzilla-4ae5589df791635549511a90b88422f24170694a.zip |
Merge remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master:
fix logic for nested lists--should be OR, not AND
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r-- | include/bb2diaspora.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index 25edb28d7..77a5f5c2a 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -113,9 +113,9 @@ function bb2diaspora($Text,$preserve_nl = false) { // to define the closing tag for the list elements. So nested lists // are going to be flattened out in Diaspora for now $endlessloop = 0; - while ((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false) && - (strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false) && - (strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false) && (++$endlessloop < 20)) { + while ((((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false)) || + ((strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false)) || + ((strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false))) && (++$endlessloop < 20)) { $Text = preg_replace_callback("/\[list\](.*?)\[\/list\]/is", 'diaspora_ul', $Text); $Text = preg_replace_callback("/\[list=1\](.*?)\[\/list\]/is", 'diaspora_ol', $Text); $Text = preg_replace_callback("/\[list=i\](.*?)\[\/list\]/s",'diaspora_ol', $Text); |