Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • bbcode-lite/trunk/BBcode-lite.php

    r1000 r1311  
    22/* 
    33Plugin Name: BBcode Lite 
    4 Plugin URI: http://bbpress.org/plugins/ 
     4Plugin URI: http://bbpress.org/plugins/topic/93 
    55Description: A lightweight alternative to allow BBcode on your forum. 
    66Author: _ck_ 
    77Author URI: http://bbShowcase.org 
    8 Version: 1.01 
     8Version: 1.0.2 
    99 
    1010License: CC-GNU-GPL http://creativecommons.org/licenses/GPL/2.0/ 
     
    2222if (preg_match_all("|\<code\>(.*?)\<\/code\>|sim", $text, $backticks)) {foreach ($backticks[0] as $backtick) {++$counter; $text=str_replace($backtick,"_bbcode_lite_".$counter."_",$text);}} 
    2323 
    24 $text = preg_replace('/\[\*\](.+?)(\[\/\*\]|(?=(\[\*\]|\[\/list\])))/sim','<li>$1</li>',$text); // * = li, a very special case since they may not be closed 
     24$text=preg_replace('/(\<br \/\>|[\s])*?\[(\*|li)\](.+?)(\<br \/\>|[\s])*?(\[\/(\*|li)\](\<br \/\>|[\s])*?|(?=(\[(\*|li)\](\<br \/\>|[\s])*?|\[\/list\])))/sim','<li>$3</li>',$text); // * = li, a very special case since they may not be closed 
    2525 
    2626$wrap = array('color' => array('font','color'),'size' => array('font','size'),'url' => array('a','href'), 'list' => array('ol','type'));         
Note: See TracChangeset for help on using the changeset viewer.