summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-07-22 22:30:52 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-07-22 22:31:09 +0200
commit093b1bae64b7cf8c67c9a684c87e9188427d96d6 (patch)
treee44fba251b4b729fcf61650547ed48e99601c3af
parentbea62bb63205101c6005fb80946e8193985667fd (diff)
downloadNim-093b1bae64b7cf8c67c9a684c87e9188427d96d6.tar.gz
docgen improvements
-rw-r--r--compiler/docgen.nim7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim
index 1ce21285e..dd1f477d3 100644
--- a/compiler/docgen.nim
+++ b/compiler/docgen.nim
@@ -663,7 +663,7 @@ proc writeOutput*(d: PDoc, filename, outExt: string, useWarning = false) =
   if optStdout in gGlobalOptions:
     writeRope(stdout, content)
   else:
-    writeRope(content, getOutFile2(filename, outExt, "htmldoc"), useWarning)
+    writeRope(content, getOutFile2(filename, outExt, "htmldocs"), useWarning)
 
 proc writeOutputJson*(d: PDoc, filename, outExt: string,
                       useWarning = false) =
@@ -674,7 +674,8 @@ proc writeOutputJson*(d: PDoc, filename, outExt: string,
     write(stdout, $content)
   else:
     var f: File
-    if open(f, getOutFile2(filename, outExt, "jsondoc"), fmWrite):
+    if open(f, getOutFile2(splitFile(filename).name,
+            outExt, "jsondocs"), fmWrite):
       write(f, $content)
       close(f)
     else:
@@ -721,7 +722,7 @@ proc commandJson*() =
   if optStdout in gGlobalOptions:
     writeRope(stdout, content)
   else:
-    echo getOutFile(gProjectFull, JsonExt)
+    #echo getOutFile(gProjectFull, JsonExt)
     writeRope(content, getOutFile(gProjectFull, JsonExt), useWarning = false)
 
 proc commandBuildIndex*() =