Correction expression regulière
This commit is contained in:
parent
799691c001
commit
c21393fe7b
@ -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';
|
||||
|
Loading…
x
Reference in New Issue
Block a user