mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Fixed some bugs
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9283 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5a027fbdf5
commit
c41ca3184a
1 changed files with 3 additions and 3 deletions
|
|
@ -274,11 +274,11 @@
|
|||
|
||||
function _parseInline($buff)
|
||||
{
|
||||
if(preg_match_all('/<([a-zA-Z0-9]+)(?:->|<!--.+?-->|[^<>])*?(?:[ \|]cond| loop)="/s', $buff, $matches) === false) return $buff;
|
||||
if(preg_match_all('/<([a-zA-Z0-9]+)[^<>]*?(?:\{[^\{\}]*?\}[^<>]*)*?(?:[ \|]cond| loop)="/s', $buff, $matches) === false) return $buff;
|
||||
|
||||
$tags = array_unique($matches[1]);
|
||||
$tags = implode('|',array_unique($matches[1]));
|
||||
$split_regex = '@(<(?:/(?:'.$tags.')|(?:'.$tags.')(?:(?:->|<!--.+?-->|[^<>])*?(?:cond|loop)="[^"]+")*)(?:->|<!--.+?-->|[^<>])*>)@s';
|
||||
$split_regex = '@(<(?:/?(?:'.$tags.')|(?:'.$tags.').+?[ "\'])>)@s';
|
||||
|
||||
$nodes = preg_split($split_regex, $buff, -1, PREG_SPLIT_DELIM_CAPTURE);
|
||||
|
||||
|
|
@ -327,7 +327,7 @@
|
|||
$depth = 1;
|
||||
for($i=$idx+2; $i < $node_len; $i+=2) {
|
||||
$nd = $nodes[$i];
|
||||
if(strpos($nd, $tag.' ') === 1) {
|
||||
if(strpos($nd, $tag) === 1) {
|
||||
$depth++;
|
||||
} elseif(strpos($nd, '/'.$tag) === 1) {
|
||||
$depth--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue