From adc56671d7fb11d6a4ccb3d88db1f04bde12e6c2 Mon Sep 17 00:00:00 2001 From: Dextheking1 Date: Fri, 23 Oct 2026 10:46:55 +0000 Subject: [PATCH] fix: do not insert an extra +

x

+ + +=====================================output===================================== + +

x

+ + +================================================================================ +`; + +exports[`if.php 1`] = ` +====================================options===================================== +parsers: ["php"] +printWidth: 80 + | printWidth +=====================================input====================================== + +

Heading

+ + +=====================================output===================================== + +

Heading

+ + +================================================================================ +`; + +exports[`while.php 1`] = ` +====================================options===================================== +parsers: ["php"] +printWidth: 80 + | printWidth +=====================================input====================================== + +

post

+ + +=====================================output===================================== + +

post

+ + +================================================================================ +`; diff --git a/tests/inline-comment-after-if/braces.php b/tests/inline-comment-after-if/braces.php new file mode 100644 index 000000000..462a74fa7 --- /dev/null +++ b/tests/inline-comment-after-if/braces.php @@ -0,0 +1,5 @@ + +

x

+ diff --git a/tests/inline-comment-after-if/if.php b/tests/inline-comment-after-if/if.php new file mode 100644 index 000000000..4d1d87990 --- /dev/null +++ b/tests/inline-comment-after-if/if.php @@ -0,0 +1,4 @@ + +

Heading

+ diff --git a/tests/inline-comment-after-if/jsfmt.spec.mjs b/tests/inline-comment-after-if/jsfmt.spec.mjs new file mode 100644 index 000000000..8829c872f --- /dev/null +++ b/tests/inline-comment-after-if/jsfmt.spec.mjs @@ -0,0 +1 @@ +run_spec(import.meta, ["php"]); diff --git a/tests/inline-comment-after-if/while.php b/tests/inline-comment-after-if/while.php new file mode 100644 index 000000000..53812af44 --- /dev/null +++ b/tests/inline-comment-after-if/while.php @@ -0,0 +1,4 @@ + +

post

+