Skip to content

Commit

Permalink
Fix #4317 Logs of failed xelatex compile should be parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Yu committed Dec 24, 2024
1 parent 5969df1 commit 5d82e49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/parse/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ function stringify(ast: Ast.Ast): string {
// https://github.com/James-Yu/LaTeX-Workshop/issues/2893#issuecomment-936312853
const latexPattern = /^Output\swritten\son\s(.*)\s\(.*\)\.$/gm
const latexFatalPattern = /Fatal error occurred, no output PDF file produced!/gm
const latexXeNoOutputPattern = /^No pages of output.$/gm

const latexmkPattern = /^Latexmk:\sapplying\srule/gm
const latexmkLog = /^Latexmk:\sapplying\srule/
Expand Down Expand Up @@ -114,7 +115,7 @@ function log(msg: string, rootFile?: string): boolean {
} else if (msg.match(texifyPattern)) {
msg = trimTexify(msg)
}
if (msg.match(latexPattern) || msg.match(latexFatalPattern)) {
if (msg.match(latexPattern) || msg.match(latexFatalPattern) || msg.match(latexXeNoOutputPattern)) {
latexLogParser.parse(msg, rootFile)
latexLogParser.showLog()
} else if (latexmkSkipped(msg)) {
Expand Down

0 comments on commit 5d82e49

Please sign in to comment.