mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-28 23:59:57 +09:00
Fix nested JS contexts in template v2 #2646
This commit is contained in:
parent
6243b0321d
commit
26d645da4d
1 changed files with 1 additions and 1 deletions
|
|
@ -227,7 +227,7 @@ class TemplateParser_v2
|
||||||
{
|
{
|
||||||
$content = preg_replace_callback('#(<\?php \$this->config->context = \'JS\'; /\* !CTX([0-9]+)! \*/\?>)(.*?)(<\?php \$this->config->context = \'HTML\'; /\* !CTX\2! \*/\?>)#s', function($match) {
|
$content = preg_replace_callback('#(<\?php \$this->config->context = \'JS\'; /\* !CTX([0-9]+)! \*/\?>)(.*?)(<\?php \$this->config->context = \'HTML\'; /\* !CTX\2! \*/\?>)#s', function($match) {
|
||||||
return preg_replace('#/\* !CTX\d+! \*/#', '', $match[1]) .
|
return preg_replace('#/\* !CTX\d+! \*/#', '', $match[1]) .
|
||||||
preg_replace('#<\?php \$this->config->context = \'[A-Z]+\'; \?>#', '', $match[3]) .
|
preg_replace('#<\?php \$this->config->context = \'[A-Z]+\'; (?:/\* !CTX[0-9]+! \*/)?\?>#', '', $match[3]) .
|
||||||
preg_replace('#/\* !CTX\d+! \*/#', '', $match[4]);
|
preg_replace('#/\* !CTX\d+! \*/#', '', $match[4]);
|
||||||
}, $content);
|
}, $content);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue