Skip to content

Commit 31a11ef

Browse files
committed
Tweak build output pages stats
1. Fix [Finished ...] not being highlighted 2. print "1 page" vs. "n pages"
1 parent 8bc0a92 commit 31a11ef

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

LaTeXTools Build Output.sublime-syntax

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ version: 2
77
hidden: true
88

99
variables:
10-
build_results: ^\[(?:(?:Build (?:cancelled by user|failed|skipped))!|Finished in .+)\]$
10+
build_results: ^\[(?:(?:Build (?:cancelled by user|failed|skipped))!|Finished\b.+)\]$
1111
log_file: ^((.+?)(?:(:)(\d+))?)(:)[ ](Double-click here to open the full log\.)$
1212

1313
contexts:

latextools/make_pdf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,8 @@ def worker(self, activity_indicator):
292292
elapsed = time.strftime("%M:%S", time.gmtime(elapsed))
293293
else:
294294
elapsed = f"{elapsed:0.1f}s"
295-
self.caller.output(f"\n\n[Finished, {num_pages} pages written in {elapsed}]")
295+
pages = "pages" if num_pages != 1 else "page"
296+
self.caller.output(f"\n\n[Finished, {num_pages} {pages} written in {elapsed}]")
296297

297298
self.caller.errors = errors
298299
self.caller.warnings = warnings

0 commit comments

Comments
 (0)