mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-30 04:29:15 +01:00
Fix InlineHTML indentation
This commit is contained in:
parent
b1cd07a7b5
commit
ec8692fb9e
@ -832,7 +832,7 @@ class Standard extends PrettyPrinterAbstract
|
||||
}
|
||||
|
||||
protected function pStmt_InlineHTML(Stmt\InlineHTML $node) {
|
||||
$newline = $node->getAttribute('hasLeadingNewline', true) ? $this->nl : '';
|
||||
$newline = $node->getAttribute('hasLeadingNewline', true) ? "\n" : '';
|
||||
return '?>' . $newline . $node->value . '<?php ';
|
||||
}
|
||||
|
||||
|
16
test/code/prettyPrinter/nestedInlineHTML.test
Normal file
16
test/code/prettyPrinter/nestedInlineHTML.test
Normal file
@ -0,0 +1,16 @@
|
||||
InlineHTML node nested inside other code
|
||||
-----
|
||||
<?php
|
||||
|
||||
function test() {
|
||||
?>
|
||||
Test
|
||||
<?php
|
||||
}
|
||||
-----
|
||||
function test()
|
||||
{
|
||||
?>
|
||||
Test
|
||||
<?php
|
||||
}
|
Loading…
Reference in New Issue
Block a user