Skip to content
Permalink
Browse files

Parser v1.1.0

폴딩 문법 등 개선
  • Loading branch information...
dercsyong committed Jun 25, 2019
1 parent f4309e6 commit c42e92acd2691ae4e74b3ad2ceead786531ec975
Showing with 7 additions and 4 deletions.
  1. +7 −4 theMark.php
@@ -159,6 +159,7 @@ public function toHtml() {
$count += count(explode('{{{', $value))-1;
$p_count = $t_count-$count;
$count -= count(explode('}}}', $value))-1;
$pprecount = $precount;
if($p_count<0&&$t_count!=$count){
$precount++;
} else if($p_count>=0&&$t_count!=$count){
@@ -169,7 +170,9 @@ public function toHtml() {
if(!strpos(substr($value, strpos($value, '{{{')), '}}}')){
$precount = count(explode('}}}', substr($value, strpos($value, '{{{'))));
}
}
} else {
$precount = $pprecount;
}
$hash = md5(date().rand(1,99999));
$print .= "\n".str_replace($hash, '}}}', preg_replace('/(}){3}/', '#!end}}}', preg_replace('/(}){3}/', $hash, $value, $precount), 1));
$original .= str_replace($hash, '}}}', preg_replace('/(}){3}/', '#!this}}}', preg_replace('/(}){3}/', $hash, $value, $precount), 1))."\n";
@@ -1037,18 +1040,18 @@ private function macroProcessor($text, $type) {
$res = mysqli_query($wiki_db, $sql);
$row = mysqli_fetch_assoc($res);
if(empty($row['result'])){
$row['result'] = ' 0';
return ' 0';
}
break;
case 'recent':
$sql = "SELECT count(*) AS result FROM wiki_contents_history";
$res = mysqli_query($wiki_db, $sql);
$row = mysqli_fetch_array($res);
if(empty($row['result'])){
$row['result'] = ' 0';
return ' 0';
}
break;
default: $row['result'] = ' 0'; break;
default: return ' 0';
}
return number_format($row['result']);
}

0 comments on commit c42e92a

Please sign in to comment.
You can’t perform that action at this time.