diff --git a/compiler/docgen.nim b/compiler/docgen.nim index 54066587b780..b4c4baa2b673 100644 --- a/compiler/docgen.nim +++ b/compiler/docgen.nim @@ -1031,7 +1031,7 @@ proc toLangSymbol(k: TSymKind, n: PNode, baseName: string): LangSymbol = if genNode != nil: var literal = "" var r: TSrcGen = initTokRender(genNode, {renderNoBody, renderNoComments, - renderNoPragmas, renderNoProcDefs, renderExpandUsing}) + renderNoPragmas, renderNoProcDefs, renderExpandUsing, renderNoPostfix}) var kind = tkEof while true: getNextTok(r, kind, literal) @@ -1099,10 +1099,10 @@ proc genItem(d: PDoc, n, nameNode: PNode, k: TSymKind, docFlags: DocFlags, nonEx priority = symbolPriority(k), info = lineinfo, module = addRstFileIndex(d, FileIndex d.module.position)) - let renderFlags = - if nonExports: {renderNoBody, renderNoComments, renderDocComments, renderSyms, - renderExpandUsing, renderNonExportedFields} - else: {renderNoBody, renderNoComments, renderDocComments, renderSyms, renderExpandUsing} + var renderFlags = {renderNoBody, renderNoComments, renderDocComments, + renderSyms, renderExpandUsing, renderNoPostfix} + if nonExports: + renderFlags.incl renderNonExportedFields nodeToHighlightedHtml(d, n, result, renderFlags, symbolOrIdEnc) let seeSrc = genSeeSrc(d, toFullPath(d.conf, n.info), n.info.line.int) @@ -1167,7 +1167,8 @@ proc genJsonItem(d: PDoc, n, nameNode: PNode, k: TSymKind, nonExports = false): name = getNameEsc(d, nameNode) comm = genRecComment(d, n) r: TSrcGen - renderFlags = {renderNoBody, renderNoComments, renderDocComments, renderExpandUsing} + renderFlags = {renderNoBody, renderNoComments, renderDocComments, + renderExpandUsing, renderNoPostfix} if nonExports: renderFlags.incl renderNonExportedFields r = initTokRender(n, renderFlags) diff --git a/nimdoc/extlinks/project/expected/main.html b/nimdoc/extlinks/project/expected/main.html index bb80b551d6d5..1a58ea2ac7b0 100644 --- a/nimdoc/extlinks/project/expected/main.html +++ b/nimdoc/extlinks/project/expected/main.html @@ -95,7 +95,7 @@
A* = object +
A = object
submoduleInt* = distinct int
submoduleInt = distinct int
SomeType* = enum +
SomeType = enum enumValueA, enumValueB, enumValueC
AnotherObject* = object - case x*: bool +
AnotherObject = object + case x: bool of true: - y*: proc (x: string) + y: proc (x: string) of false: @@ -392,7 +392,7 @@Types
FooBuzz* {....deprecated: "FooBuzz msg".} = int
FooBuzz {....deprecated: "FooBuzz msg".} = int
MyObject* = object - someString*: string ## This is a string - annotated* {.somePragma.}: string ## This is an annotated string +
MyObject = object + someString: string ## This is a string + annotated {.somePragma.}: string ## This is an annotated string