Skip to content

Commit 6a4ca21

Browse files
authored
fix parsing for "Incomplete \if...; all text was ignored after line"
fix parsing for "Incomplete \if...; all text was ignored after line"
1 parent 39a35a9 commit 6a4ca21

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

parseTeXlog.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,16 @@ def handle_badbox(l):
705705
errors.append(err_msg)
706706
errors.append("Check the TeX log file for more information")
707707
continue
708+
#special: all text was ignored after line
709+
if "all text was ignored after line" in line:
710+
# we may be unable to report a file by popping it, so HACK HACK HACK
711+
file_name, linelen = advance_iterator(log_iterator) # <inserted text>
712+
file_name, linelen = advance_iterator(log_iterator) # \fi
713+
file_name, linelen = advance_iterator(log_iterator)
714+
file_name = file_name[3:] # here is the file name with <*> in front
715+
errors.append("TeX STOPPED: " + line[1:].strip())
716+
errors.append("TeX reports the error was in file:" + file_name)
717+
continue
708718
# Now it's a regular TeX error
709719
err_msg = line[2:] # skip "! "
710720
# next time around, err_msg will be set and we'll extract all info

0 commit comments

Comments
 (0)