diff --git a/__tests__/fixtures/snapshots/inline_php_directive.snapshot b/__tests__/fixtures/snapshots/inline_php_directive.snapshot new file mode 100644 index 00000000..5663d335 --- /dev/null +++ b/__tests__/fixtures/snapshots/inline_php_directive.snapshot @@ -0,0 +1,18 @@ +------------------------------------options---------------------------------------- +{} +------------------------------------content---------------------------------------- +
+ + @if ($counter) + {{-- --}} + @endif + +
+------------------------------------expected---------------------------------------- +
+ + @if ($counter) + {{-- --}} + @endif + +
diff --git a/src/formatter.ts b/src/formatter.ts index 8438dcee..f08ab923 100644 --- a/src/formatter.ts +++ b/src/formatter.ts @@ -194,8 +194,8 @@ export default class Formatter { .then((target) => this.preserveRawBladeBrace(target)) .then((target) => this.preserveConditions(target)) .then((target) => this.preservePropsBlock(target)) - .then((target) => this.preserveInlineDirective(target)) .then((target) => this.preserveInlinePhpDirective(target)) + .then((target) => this.preserveInlineDirective(target)) .then((target) => this.preserveBladeDirectivesInScripts(target)) .then((target) => this.preserveBladeDirectivesInStyles(target)) .then((target) => this.preserveCustomDirective(target)) @@ -231,8 +231,8 @@ export default class Formatter { .then((target) => this.restoreCustomDirective(target)) .then((target) => this.restoreBladeDirectivesInStyles(target)) .then((target) => this.restoreBladeDirectivesInScripts(target)) - .then((target) => this.restoreInlinePhpDirective(target)) .then((target) => this.restoreInlineDirective(target)) + .then((target) => this.restoreInlinePhpDirective(target)) .then((target) => this.restoreConditions(target)) .then((target) => this.restoreRawBladeBrace(target)) .then((target) => this.restoreBladeBrace(target))