diff --git a/src/utils/parser.ts b/src/utils/parser.ts index 830cc1f..0c674f3 100644 --- a/src/utils/parser.ts +++ b/src/utils/parser.ts @@ -2,7 +2,7 @@ export function parseFile(file: string, defineName: string): string{ if(defineName !== ""){ - var regex = new RegExp(`\\s*\\#define\\s+${defineName}\\s+(?:\\"|\\')([\\d.]+)`); + var regex = new RegExp(/\s*\#define\s+/.source + defineName + /\s+(?:"|\')(.*)"/.source); } else{ var regex = /\s*version\s*=\s*(?:\"|\')([\d.]+)/; @@ -18,4 +18,4 @@ export function parseFile(file: string, defineName: string): string{ } } return parsedVersion; -} \ No newline at end of file +}