From 2b7c47b1222b4276ea12452e84f3b8d44b6b8315 Mon Sep 17 00:00:00 2001 From: EuklidAlexandria <36775154+EuklidAlexandria@users.noreply.github.com> Date: Wed, 17 Jul 2024 16:48:59 +0200 Subject: [PATCH] Fixes #23846; prepend nimArgs to args (#23847) Fixes #23846. Probably, nimArgs should be prepended in other places (e.g. `buildDocSamples`). --- tools/kochdocs.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/kochdocs.nim b/tools/kochdocs.nim index bd5c4ecbe6..477fb29fa8 100644 --- a/tools/kochdocs.nim +++ b/tools/kochdocs.nim @@ -325,7 +325,8 @@ proc nim2pdf(src: string, dst: string, nimArgs: string) = exec(cmd) moveFile(texFile.changeFileExt("pdf"), dst) -proc buildPdfDoc*(nimArgs, destPath: string) = +proc buildPdfDoc*(args: string, destPath: string) = + let args = nimArgs & " " & args var pdfList: seq[string] createDir(destPath) if os.execShellCmd("xelatex -version") != 0: @@ -334,7 +335,7 @@ proc buildPdfDoc*(nimArgs, destPath: string) = for src in items(mdPdfList): let dst = destPath / src.lastPathPart.changeFileExt("pdf") pdfList.add dst - nim2pdf(src, dst, nimArgs) + nim2pdf(src, dst, args) echo "\nOutput PDF files: \n ", pdfList.join(" ") # because `nim2pdf` is a bit verbose proc buildJS(): string =