Skip to content

Commit

Permalink
Add more generic line separator in getting models and enums regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
theArina authored and AhmedElywa committed Jun 11, 2024
1 parent c5c0661 commit 3210e4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/schema/src/PrismaReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ export class PrismaReader {
}

get models() {
return this.data.match(/\n(model(\s)[\s\S]*?})\n/g);
return this.data.match(/\n(model(\s)[\s\S]*?})\r?\n/g);
}

get enums() {
return this.data.match(/\n(enum(\s)[\s\S]*?})\n/g);
return this.data.match(/\n(enum(\s)[\s\S]*?})\r?\n/g);
}

getModelDocumentation(modelName: string) {
Expand Down

0 comments on commit 3210e4c

Please sign in to comment.