Skip to content

Commit e5a8e0c

Browse files
DruueJolg42
andauthored
Make preview features regex more tolerant of spacing
Co-authored-by: Joël Galeran <[email protected]>
1 parent 6f09510 commit e5a8e0c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/language-server/src/lib/ast/configBlock.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ export function getAllPreviewFeaturesFromGenerators(schema: PrismaSchema): Previ
3737
* generator client {
3838
* provider = "prisma-client-js"
3939
* // previewFeatures = [] // This will be ignored
40-
* previewFeatures = ["views"]
40+
* previewFeatures = ["views"]
4141
* }
4242
* ```
4343
*
44-
* ? for more info: https://regex101.com/r/ezoTU2/1
44+
* ? for more info: https://regex101.com/r/ezoTU2/2
4545
*/
46-
const previewFeaturesRegex = /^\s*(?!\/\/\s)previewFeatures\s=\s(\[.*\])/m
46+
const previewFeaturesRegex = /^\s*(?!\/\/\s)previewFeatures\s*=\s*(\[.*\])/m
4747

4848
const result = schema.findWithRegex(previewFeaturesRegex)
4949

0 commit comments

Comments
 (0)