Remove empty class and style attributes when compiling template v2

This commit is contained in:
Kijin Sung 2025-11-29 10:52:17 +09:00
parent cd3af499e8
commit 50dd010e2d
4 changed files with 14 additions and 1 deletions

View file

@ -58,6 +58,8 @@
'margin: 1rem' => Context::get('bar'),
'padding: 2rem' => false,
]); ?>></span>
<span<?php echo $this->_v2_buildAttribute('class', ['a' => false, 'b' => false]); ?>></span>
<span<?php echo $this->_v2_buildAttribute('style', ['a' => false, 'b' => false]); ?>></span>
</div>
<script type="text/javascript"<?php $this->config->context = 'JS'; ?>>

View file

@ -54,6 +54,8 @@
<div class="barContainer" data-bar="[&quot;Rhy&quot;,&quot;miX&quot;,&quot;is&quot;,&quot;da&quot;,&quot;BEST!&quot;]">
<span class="a-1 font-normal bg-gray-200"></span>
<span style="border-radius: 0.25rem; margin: 1rem"></span>
<span></span>
<span></span>
</div>
<script type="text/javascript">

View file

@ -58,6 +58,8 @@
'margin: 1rem' => Context::get('bar'),
'padding: 2rem' => false,
])></span>
<span @class(['a' => false, 'b' => false])></span>
<span @style(['a' => false, 'b' => false])></span>
</div>
<script type="text/javascript">