Skip to content

Commit

Permalink
fix(shared-integration): vscode match php <? stuck (#3745)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-He95 committed Apr 20, 2024
1 parent 8938d42 commit 3827444
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shared-integration/src/defaults.ts
Expand Up @@ -16,7 +16,7 @@ export const defaultIdeMatchInclude: RegExp[] = [
// String literals
/(['"`])[^\1]*?\1/g,
// HTML tags
/<[^\/](?:"[^"]*"|'[^"]*'|[^>])+>/g,
/<[^\/?<>0-9$_!](?:"[^"]*"|'[^"]*'|[^>])+>/g,
// CSS directives
/(@apply|--uno|--at-apply)[^;]*?;/g,
]
Expand Down
11 changes: 11 additions & 0 deletions test/pos.test.ts
Expand Up @@ -416,6 +416,17 @@ let transition = 'ease-in-out duration-300'
],
]
`)

// #3733, match php <? stuck
expect(await match(uno, `<?php
Route::get('/some-route', [SomeController::class, 'someMethod']);
Route::get('/some-route', [SomeController::class, 'someMethod']);
Route::get('/some-route', [SomeController::class, 'someMethod']);
`, '', {
includeRegex: defaultIdeMatchInclude,
excludeRegex: defaultIdeMatchExclude,
}))
.toMatchInlineSnapshot(`[]`)
})
})

Expand Down

0 comments on commit 3827444

Please sign in to comment.