parent
b02bc66197
commit
52bee6baba
1 changed files with 3 additions and 4 deletions
|
|
@ -787,14 +787,13 @@ proc getOutFile2(conf: ConfigRef; filename, ext, dir: string): string =
|
||||||
|
|
||||||
proc writeOutput*(d: PDoc, filename, outExt: string, useWarning = false) =
|
proc writeOutput*(d: PDoc, filename, outExt: string, useWarning = false) =
|
||||||
var content = genOutFile(d)
|
var content = genOutFile(d)
|
||||||
var success = true
|
|
||||||
if optStdout in d.conf.globalOptions:
|
if optStdout in d.conf.globalOptions:
|
||||||
writeRope(stdout, content)
|
writeRope(stdout, content)
|
||||||
else:
|
else:
|
||||||
let outfile = getOutFile2(d.conf, filename, outExt, "htmldocs")
|
let outfile = getOutFile2(d.conf, filename, outExt, "htmldocs")
|
||||||
success = writeRope(content, outfile)
|
createDir(outfile.parentDir)
|
||||||
if not success:
|
if not writeRope(content, outfile):
|
||||||
rawMessage(d.conf, if useWarning: warnCannotOpenFile else: errCannotOpenFile, filename)
|
rawMessage(d.conf, if useWarning: warnCannotOpenFile else: errCannotOpenFile, outfile)
|
||||||
|
|
||||||
proc writeOutputJson*(d: PDoc, filename, outExt: string,
|
proc writeOutputJson*(d: PDoc, filename, outExt: string,
|
||||||
useWarning = false) =
|
useWarning = false) =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue