Changeset 1295 for bbcode-lite
- Timestamp:
- 08/18/08 05:10:04 (4 months ago)
- Files:
-
- bbcode-lite/trunk/BBcode-lite.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
bbcode-lite/trunk/BBcode-lite.php
r1294 r1295 22 22 if (preg_match_all("|\<code\>(.*?)\<\/code\>|sim", $text, $backticks)) {foreach ($backticks[0] as $backtick) {++$counter; $text=str_replace($backtick,"_bbcode_lite_".$counter."_",$text);}} 23 23 24 $text = preg_replace('/\[(\*|li)\](.+?)(\[\/(\*|li)\]|(?=(\[(\*|li)\]|\[\/list\])))/sim','<li>$2</li>',$text);// * = li, a very special case since they may not be closed24 $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 25 25 26 26 $wrap = array('color' => array('font','color'),'size' => array('font','size'),'url' => array('a','href'), 'list' => array('ol','type'));
