Correction expression regulière

This commit is contained in:
Michael RICOIS 2010-04-16 16:44:44 +00:00
parent 799691c001
commit c21393fe7b

View File

@ -8,8 +8,10 @@ function commentaires_siren($content){
}
function commentaires_liste($content){
$pattern = '/(.*?)<li([\+|-|=]?)>(.*)/i';
$pattern = '/(.*?)<li([\=|\+|-]?)>(.*)/i';
if(preg_match($pattern, $content, $matches)){
FB::log($content, 'content');
FB::log($matches[2], 'li');
switch($matches[2]){
case '+':
$class = 'plus';
@ -20,7 +22,7 @@ function commentaires_liste($content){
$replace = '$1<span class="'.$class.'">$3</span>';
break;
case '=':
$replace = '$1<image src="./img/li-egale.gif">$3';
$replace = '$1<image style="vertical-align:middle;" src="./img/li-egale.gif">$3';
break;
default:
$class = 'point';