From 4c546adbb1afc560365d4f4e6fa58400510dd0c8 Mon Sep 17 00:00:00 2001 From: Eric Mc Sween Date: Fri, 27 May 2022 10:57:18 -0400 Subject: [PATCH] Add non-capturing groups GitOrigin-RevId: 313e62d4add4bd0694efd98927032edf6114f8e5 --- services/web/frontend/js/ide/log-parser/latex-log-parser.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/frontend/js/ide/log-parser/latex-log-parser.js b/services/web/frontend/js/ide/log-parser/latex-log-parser.js index 7bf684dc52..e62f8075b0 100644 --- a/services/web/frontend/js/ide/log-parser/latex-log-parser.js +++ b/services/web/frontend/js/ide/log-parser/latex-log-parser.js @@ -1,12 +1,12 @@ // Define some constants const LOG_WRAP_LIMIT = 79 -const LATEX_WARNING_REGEX = /^LaTeX(3| Font)? Warning: (.*)$/ +const LATEX_WARNING_REGEX = /^LaTeX(?:3| Font)? Warning: (.*)$/ const HBOX_WARNING_REGEX = /^(Over|Under)full \\(v|h)box/ -const PACKAGE_WARNING_REGEX = /^((Package|Class|Module) \b.+\b Warning:.*)$/ +const PACKAGE_WARNING_REGEX = /^((?:Package|Class|Module) \b.+\b Warning:.*)$/ // This is used to parse the line number from common latex warnings const LINES_REGEX = /lines? ([0-9]+)/ // This is used to parse the package name from the package warnings -const PACKAGE_REGEX = /^(Package|Class|Module) (\b.+\b) Warning/ +const PACKAGE_REGEX = /^(?:Package|Class|Module) (\b.+\b) Warning/ const FILE_LINE_ERROR_REGEX = /^([./].*):(\d+): (.*)/ const STATE = {