mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Fixed a bug for a regular expression
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9262 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5f66f744e1
commit
1d783a6dbf
1 changed files with 2 additions and 2 deletions
|
|
@ -281,11 +281,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.')(?:(?:->|<!--.+?-->|[^<>])*?(?:cond|loop)="[^"]+")*)(?:->|<!--.+?-->|[^<>])*>)@s';
|
||||
|
||||
$nodes = preg_split($split_regex, $buff, -1, PREG_SPLIT_DELIM_CAPTURE);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue