diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-08-04 14:49:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-04 08:49:51 +0200 |
commit | 2aeb0d516b5e4cde1abb68a0c0d5393cf8c65915 (patch) | |
tree | a79857194297aa20629d8b89e1a5744f5c82af9c /compiler | |
parent | 7af484da947abc5dfc1e941a45c1cde5ee995aae (diff) | |
download | Nim-2aeb0d516b5e4cde1abb68a0c0d5393cf8c65915.tar.gz |
fixes #20132; fixes the broken jsondoc comand [backport] (#20135)
* fixes #20132; fixes the broken jsondoc comand * add testcase
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/docgen.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim index 0ca1b8c52..52bb93c19 100644 --- a/compiler/docgen.nim +++ b/compiler/docgen.nim @@ -1360,9 +1360,10 @@ proc finishGenerateDoc*(d: var PDoc) = var str: string renderRstToOut(d[], resolved, str) entry.json[entry.rstField] = %str - d.jEntriesFinal.add entry.json d.jEntriesPre[i].rst = nil + d.jEntriesFinal.add entry.json # generates docs + proc add(d: PDoc; j: JsonItem) = if j.json != nil or j.rst != nil: d.jEntriesPre.add j |