diff --git a/compiler/docgen.nim b/compiler/docgen.nim index c01d5633f883..d774fd50891e 100644 --- a/compiler/docgen.nim +++ b/compiler/docgen.nim @@ -216,7 +216,8 @@ proc newDocumentor*(filename: AbsoluteFile; cache: IdentCache; conf: ConfigRef, # Include the current file if we're parsing a nim file let importStmt = if d.isPureRst: "" else: "import \"$1\"\n" % [d.filename.replace("\\", "/")] writeFile(outp, importStmt & content) - let c = if cmd.startsWith("nim "): os.getAppFilename() & cmd.substr(3) + let c = if cmd.startsWith("nim "): os.getAppFilename() & " " & $conf.backend & cmd.substr("nim ".len) + elif cmd.startsWith("nim "): os.getAppFilename() & cmd.substr("nim".len) else: cmd let c2 = c % quoteShell(outp) rawMessage(conf, hintExecuting, c2) diff --git a/lib/packages/docutils/rstgen.nim b/lib/packages/docutils/rstgen.nim index 13dff68e9946..edd987a76ca0 100644 --- a/lib/packages/docutils/rstgen.nim +++ b/lib/packages/docutils/rstgen.nim @@ -865,7 +865,7 @@ proc parseCodeBlockField(d: PDoc, n: PRstNode, params: var CodeBlockParams) = of "test": params.testCmd = n.getFieldValue.strip if params.testCmd.len == 0: - params.testCmd = "nim c -r $1" + params.testCmd = "nim -r $1" # The nim backend is auto-set in docgen.nim else: params.testCmd = unescape(params.testCmd) of "status", "exitcode":