فهرست منبع

Use non-capturing groups in the modified regexs

This ensures that all of the old group indexes remain unchanged.

Signed-off-by: Max Chernoff <49086429+gucci-on-fleek@users.noreply.github.com>
Max Chernoff 4 سال پیش
والد
کامیت
049735bfba
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      services/web/frontend/js/ide/log-parser/latex-log-parser.js

+ 3 - 3
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 = {