Skip to content

Commit 2449cf1

Browse files
committed
Close #3999 Display missing character warning
1 parent f46a7ef commit 2449cf1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/components/parserlib/latexlog.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const latexBoxAlt = /^((?:Over|Under)full \\[vh]box \([^)]*\)) detected at line
1212
const latexBoxOutput = /^((?:Over|Under)full \\[vh]box \([^)]*\)) has occurred while \\output is active(?: \[(\d+)\])?/
1313
const latexWarn = /^((?:(?:Class|Package|Module) \S*)|LaTeX(?: \S*)?|LaTeX3) (Warning|Info):\s+(.*?)(?: on(?: input)? line (\d+))?(\.|\?|)$/
1414
const latexPackageWarningExtraLines = /^\((.*)\)\s+(.*?)(?: +on input line (\d+))?(\.)?$/
15+
const latexMissChar = /^\s*(Missing character:.*?!)/
1516
const bibEmpty = /^Empty `thebibliography' environment/
1617
const biberWarn = /^Biber warning:.*WARN - I didn't find a database entry for '([^']+)'/
1718

@@ -167,6 +168,20 @@ function parseLine(line: string, state: ParserState) {
167168
parseLine(line.substring(result[0].length), state)
168169
return
169170
}
171+
result = line.match(latexMissChar)
172+
if (result) {
173+
if (state.currentResult.type !== '') {
174+
buildLog.push(state.currentResult)
175+
}
176+
state.currentResult = {
177+
type: 'warning',
178+
file: filename,
179+
line: 1,
180+
text: result[1]
181+
}
182+
state.searchEmptyLine = false
183+
return
184+
}
170185
result = line.match(latexWarn)
171186
if (result) {
172187
if (state.currentResult.type !== '') {

0 commit comments

Comments
 (0)