Skip to content

Commit 16ec7bf

Browse files
Fix bug where unfinished lines were not being detected
1 parent e78cd9f commit 16ec7bf

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

parseTeXlog.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,15 +282,18 @@ def handle_badbox(l):
282282
if file_match:
283283
debug("MATCHED (long line)")
284284
file_name = file_match.group(1)
285-
file_name = os.path.normpath(file_name.strip('"'))
286285

286+
# remove quotes if necessary, but first save the count for a later check
287+
quotecount = file_name.count("\"")
288+
file_name = file_name.replace("\"", "")
289+
290+
# Normalize the file path
291+
file_name = os.path.normpath(file_name)
287292
if not os.path.isabs(file_name):
288293
file_name = os.path.normpath(os.path.join(root_dir, file_name))
289294

290295
file_extra = file_match.group(2) + file_match.group(3) # don't call it "extra"
291-
# remove quotes if necessary, but first save the count for a later check
292-
quotecount = file_name.count("\"")
293-
file_name = file_name.replace("\"", "")
296+
294297
# NOTE: on TL201X pdftex sometimes writes "pdfTeX warning" right after file name
295298
# This may or may not be a stand-alone long line, but in any case if we
296299
# extend, the file regex will fire regularly

0 commit comments

Comments
 (0)