File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -193,20 +193,19 @@ public function macroName(MacroNode $node, PhpWriter $writer)
193193
194194 public function macroNameEnd (MacroNode $ node , PhpWriter $ writer )
195195 {
196- preg_match ('#^(.*? n:\w+>)(.*)(<[^?].*)\z#s ' , $ node ->content , $ parts );
197196 $ tagName = strtolower ($ node ->htmlNode ->name );
198197 if ($ tagName === 'form ' ) {
199- $ node ->content = $ parts [ 1 ] . $ parts [ 2 ] . '<?php echo Nette\Bridges\FormsLatte\Runtime::renderFormEnd($_form, FALSE) ?> ' . $ parts [ 3 ] ;
198+ $ node ->innerContent .= '<?php echo Nette\Bridges\FormsLatte\Runtime::renderFormEnd($_form, FALSE) ?> ' ;
200199 } elseif ($ tagName === 'label ' ) {
201200 if ($ node ->htmlNode ->isEmpty ) {
202- $ node ->content = $ parts [ 1 ] . "<?php echo \$_input->{method_exists( \$_input, 'getLabelPart')?'getLabelPart':'getLabel'}()->getHtml() ?> " . $ parts [ 3 ] ;
201+ $ node ->innerContent = "<?php echo \$_input->{method_exists( \$_input, 'getLabelPart')?'getLabelPart':'getLabel'}()->getHtml() ?> " ;
203202 }
204203 } elseif ($ tagName === 'button ' ) {
205204 if ($ node ->htmlNode ->isEmpty ) {
206- $ node ->content = $ parts [ 1 ] . '<?php echo htmlspecialchars($_input->caption) ?> ' . $ parts [ 3 ] ;
205+ $ node ->innerContent = '<?php echo htmlspecialchars($_input->caption) ?> ' ;
207206 }
208207 } else { // select, textarea
209- $ node ->content = $ parts [ 1 ] . '<?php echo $_input->getControl()->getHtml() ?> ' . $ parts [ 3 ] ;
208+ $ node ->innerContent = '<?php echo $_input->getControl()->getHtml() ?> ' ;
210209 }
211210 }
212211
You can’t perform that action at this time.
0 commit comments