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 @@

Imports

Types

-
A* = object
+  
A = object
   
diff --git a/nimdoc/extlinks/project/expected/sub/submodule.html b/nimdoc/extlinks/project/expected/sub/submodule.html index f30123eeefe9..60887ae37ad3 100644 --- a/nimdoc/extlinks/project/expected/sub/submodule.html +++ b/nimdoc/extlinks/project/expected/sub/submodule.html @@ -84,7 +84,7 @@

nimdoc/extlinks/project/sub/submodule

Types

-
submoduleInt* = distinct int
+
submoduleInt = distinct int
diff --git a/nimdoc/testproject/expected/subdir/subdir_b/utils.html b/nimdoc/testproject/expected/subdir/subdir_b/utils.html index b1c0f4e3ed92..ba9512d5a9d7 100644 --- a/nimdoc/testproject/expected/subdir/subdir_b/utils.html +++ b/nimdoc/testproject/expected/subdir/subdir_b/utils.html @@ -253,7 +253,7 @@

Types

-
G*[T] = object
+  
G[T] = object
   
@@ -262,7 +262,7 @@

Types

-
SomeType* = enum
+  
SomeType = enum
   enumValueA, enumValueB, enumValueC
diff --git a/nimdoc/testproject/expected/testproject.html b/nimdoc/testproject/expected/testproject.html index 6486b5581aa6..48c8e86ab176 100644 --- a/nimdoc/testproject/expected/testproject.html +++ b/nimdoc/testproject/expected/testproject.html @@ -368,7 +368,7 @@

Imports

Types

-
A* {.inject.} = enum
+  
A {.inject.} = enum
   aA
@@ -377,10 +377,10 @@

Types

-
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

-
B* {.inject.} = enum
+  
B {.inject.} = enum
   bB
@@ -401,7 +401,7 @@

Types

-
Foo* = enum
+  
Foo = enum
   enumValueA2
@@ -410,7 +410,7 @@

Types

-
FooBuzz* {....deprecated: "FooBuzz msg".} = int
+
FooBuzz {....deprecated: "FooBuzz msg".} = int
Deprecated: FooBuzz msg @@ -421,9 +421,9 @@

Types

-
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
   
@@ -432,7 +432,7 @@

Types

-
Shapes* = enum
+  
Shapes = enum
   Circle,                   ## A circle
   Triangle,                 ## A three-sided shape
   Rectangle                  ## A four-sided shape
@@ -443,8 +443,8 @@

Types

-
T19396* = object
-  a*: int
+  
T19396 = object
+  a: int