File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 5
5
use App \Contexts \Base ;
6
6
use App \Support \Debugs ;
7
7
use Microsoft \PhpParser \Node \SourceFileNode ;
8
+ use Microsoft \PhpParser \Node \Statement \InlineHtml ;
8
9
use Microsoft \PhpParser \Parser ;
9
10
use Microsoft \PhpParser \SkippedToken ;
10
11
@@ -31,6 +32,14 @@ public function __construct(protected string $document, $debug = false)
31
32
32
33
protected function documentSkipsClosingQuote ()
33
34
{
35
+ if (count ($ this ->sourceFile ->statementList ) === 1 && $ this ->sourceFile ->statementList [0 ] instanceof InlineHtml) {
36
+ // Probably Blade...
37
+ $ lastChar = substr ($ this ->sourceFile ->getFullText (), -1 );
38
+ $ closesWithQuote = in_array ($ lastChar , ['" ' , "' " ]);
39
+
40
+ return $ closesWithQuote ;
41
+ }
42
+
34
43
foreach ($ this ->sourceFile ->getDescendantNodesAndTokens () as $ child ) {
35
44
if ($ child instanceof SkippedToken && $ child ->getText ($ this ->sourceFile ->getFullText ()) === "' " ) {
36
45
return true ;
You can’t perform that action at this time.
0 commit comments