Allow use, include, and load directives to appear anywhere in a line

This commit is contained in:
Kijin Sung 2023-10-17 03:06:40 +09:00
parent 11ef5dcfff
commit 66980edab1
5 changed files with 23 additions and 19 deletions

View file

@ -1,9 +1,9 @@
<config version="2" />
@use('Rhymix\Framework\Push', 'Push')
@include('^/common/tpl/refresh.html')
@load('^/common/js/plugins/ckeditor/')
@load('css/style.css')
<div>@include('^/common/tpl/refresh.html')</div>
<div>@load('^/common/js/plugins/ckeditor/')</div>
<load src="css/style.css" media="print" />
<?php
$foo = 'FOOFOOFOO';

View file

@ -1,9 +1,9 @@
<?php if (!defined("RX_VERSION")) exit(); ?><?php $this->config->version = 2; ?>
<?php (function($__dir, $__path, $__vars = null) { $__tpl = new \Rhymix\Framework\Template($__dir, $__path, "html"); if ($__vars) $__tpl->setVars($__vars); echo $__tpl->compile(); })("common/tpl", 'refresh.html'); ?>
<?php \Context::loadJavascriptPlugin('ckeditor'); ?>
<?php \Context::loadFile(['./tests/_data/template/css/style.css', '', '', '', []]); ?>
<div><?php (function($__dir, $__path, $__vars = null) { $__tpl = new \Rhymix\Framework\Template($__dir, $__path, "html"); if ($__vars) $__tpl->setVars($__vars); echo $__tpl->compile(); })("common/tpl", 'refresh.html'); ?></div>
<div><?php \Context::loadJavascriptPlugin('ckeditor'); ?></div>
<?php \Context::loadFile(['./tests/_data/template/css/style.css', 'print', '', '', []]); ?>
<?php
$__Context->foo = 'FOOFOOFOO';

View file

@ -1,8 +1,10 @@
<script>
<div><script>
top.location.reload();
</script>
</div>
<div></div>
{{ $foo }}