Skip to content

Commit da2e0fc

Browse files
authored
Merge pull request #887 from shufo/fix/inline-php-directive
2 parents 9e1e075 + 2010b5d commit da2e0fc

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
------------------------------------options----------------------------------------
2+
{}
3+
------------------------------------content----------------------------------------
4+
<div @php($counter = 1)>
5+
<x-share>
6+
@if ($counter)
7+
{{-- --}}
8+
@endif
9+
</x-share>
10+
</div>
11+
------------------------------------expected----------------------------------------
12+
<div @php($counter = 1)>
13+
<x-share>
14+
@if ($counter)
15+
{{-- --}}
16+
@endif
17+
</x-share>
18+
</div>

src/formatter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ export default class Formatter {
194194
.then((target) => this.preserveRawBladeBrace(target))
195195
.then((target) => this.preserveConditions(target))
196196
.then((target) => this.preservePropsBlock(target))
197-
.then((target) => this.preserveInlineDirective(target))
198197
.then((target) => this.preserveInlinePhpDirective(target))
198+
.then((target) => this.preserveInlineDirective(target))
199199
.then((target) => this.preserveBladeDirectivesInScripts(target))
200200
.then((target) => this.preserveBladeDirectivesInStyles(target))
201201
.then((target) => this.preserveCustomDirective(target))
@@ -231,8 +231,8 @@ export default class Formatter {
231231
.then((target) => this.restoreCustomDirective(target))
232232
.then((target) => this.restoreBladeDirectivesInStyles(target))
233233
.then((target) => this.restoreBladeDirectivesInScripts(target))
234-
.then((target) => this.restoreInlinePhpDirective(target))
235234
.then((target) => this.restoreInlineDirective(target))
235+
.then((target) => this.restoreInlinePhpDirective(target))
236236
.then((target) => this.restoreConditions(target))
237237
.then((target) => this.restoreRawBladeBrace(target))
238238
.then((target) => this.restoreBladeBrace(target))

0 commit comments

Comments
 (0)