fix extension passing for rst2tex command
This commit is contained in:
parent
57d0ff385c
commit
c1f677a7c9
1 changed files with 3 additions and 3 deletions
|
|
@ -112,7 +112,7 @@ proc getOutFile2(conf: ConfigRef; filename: RelativeFile,
|
||||||
else:
|
else:
|
||||||
result = getOutFile(conf, filename, ext)
|
result = getOutFile(conf, filename, ext)
|
||||||
|
|
||||||
proc newDocumentor*(filename: AbsoluteFile; cache: IdentCache; conf: ConfigRef): PDoc =
|
proc newDocumentor*(filename: AbsoluteFile; cache: IdentCache; conf: ConfigRef, outExt: string = HtmlExt): PDoc =
|
||||||
declareClosures()
|
declareClosures()
|
||||||
new(result)
|
new(result)
|
||||||
result.conf = conf
|
result.conf = conf
|
||||||
|
|
@ -146,7 +146,7 @@ proc newDocumentor*(filename: AbsoluteFile; cache: IdentCache; conf: ConfigRef):
|
||||||
warnUser, "only 'rst2html' supports the ':test:' attribute")
|
warnUser, "only 'rst2html' supports the ':test:' attribute")
|
||||||
result.emitted = initIntSet()
|
result.emitted = initIntSet()
|
||||||
result.destFile = getOutFile2(conf, relativeTo(filename, conf.projectPath),
|
result.destFile = getOutFile2(conf, relativeTo(filename, conf.projectPath),
|
||||||
HtmlExt, RelativeDir"htmldocs", false)
|
outExt, RelativeDir"htmldocs", false)
|
||||||
result.thisDir = result.destFile.splitFile.dir
|
result.thisDir = result.destFile.splitFile.dir
|
||||||
|
|
||||||
proc dispA(conf: ConfigRef; dest: var Rope, xml, tex: string, args: openArray[Rope]) =
|
proc dispA(conf: ConfigRef; dest: var Rope, xml, tex: string, args: openArray[Rope]) =
|
||||||
|
|
@ -960,7 +960,7 @@ proc commandDoc*(cache: IdentCache, conf: ConfigRef) =
|
||||||
proc commandRstAux(cache: IdentCache, conf: ConfigRef;
|
proc commandRstAux(cache: IdentCache, conf: ConfigRef;
|
||||||
filename: AbsoluteFile, outExt: string) =
|
filename: AbsoluteFile, outExt: string) =
|
||||||
var filen = addFileExt(filename, "txt")
|
var filen = addFileExt(filename, "txt")
|
||||||
var d = newDocumentor(filen, cache, conf)
|
var d = newDocumentor(filen, cache, conf, outExt)
|
||||||
d.onTestSnippet = proc (d: var RstGenerator; filename, cmd: string;
|
d.onTestSnippet = proc (d: var RstGenerator; filename, cmd: string;
|
||||||
status: int; content: string) =
|
status: int; content: string) =
|
||||||
var outp: AbsoluteFile
|
var outp: AbsoluteFile
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue