Skip to content

Commit 53dfe90

Browse files
committed
Merge pull request #22 from apuignav/multiline
Proper handling of line breaks
2 parents 4641ea4 + 42ece8d commit 53dfe90

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

latexrun

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -837,14 +837,14 @@ class LaTeX(Task):
837837
"""
838838
jobname = outname = None
839839
for m in re.finditer(r'^Transcript written on "?(.*)\.log"?\.$', stdout,
840-
re.MULTILINE):
841-
jobname = m.group(1)
840+
re.MULTILINE | re.DOTALL):
841+
jobname = m.group(1).replace('\n', '')
842842
if jobname is None:
843843
print(stdout, file=sys.stderr)
844844
raise TaskError('failed to extract job name from latex log')
845845
for m in re.finditer(r'^Output written on "?(.*\.[^ ."]+)"? \([0-9]+ page',
846-
stdout, re.MULTILINE):
847-
outname = m.group(1)
846+
stdout, re.MULTILINE | re.DOTALL):
847+
outname = m.group(1).replace('\n', '')
848848
if outname is None and not \
849849
re.search(r'^No pages of output\.$|^! Emergency stop\.$'
850850
r'|^! ==> Fatal error occurred, no output PDF file produced!$',

0 commit comments

Comments
 (0)