Skip to content

Commit 28aa922

Browse files
committed
fix: inefficient regex from codeql scan
1 parent d9593ea commit 28aa922

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parsers/default-parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const KEYS = [
1414
* Default `Parser` instance.
1515
*/
1616
export const defaultParser = new Parser(
17-
/^(?:(?:(.*?)[:(](\d+)[:,](\d+)[)]? ?[:-] ?)|(?:error ?))(?:error ?)?(TS\d+)?(?:(?:: )|(?: - )|(?: ))(.*(?:\r?\n {2,}.*)*)(?:(?:\r?\n){2,}((?:\d+\s+.*\r?\n\s+~+(?:\r?\n)?)*))?$/gm,
17+
/^(?:(?:(.*?)[:(](\d+)[:,](\d+)[)]? ?[:-] ?)|(?:error ?))(?:error ?)?(TS\d+)?(?:(?:: )|(?: - )|(?: ))(.*(?:\r?\n {2,}.*)*)(?:(?:\r?\n){2,}((?:\d+\s+.*\r?\n\s+~+(?:\r?\n){0,1})*))?$/gm,
1818
KEYS,
1919
(input) => {
2020
// biome-ignore lint/suspicious/noControlCharactersInRegex: needed for removing colored text

0 commit comments

Comments
 (0)