diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/docgen.nim | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim index fd5c8b47a..37831c72c 100644 --- a/compiler/docgen.nim +++ b/compiler/docgen.nim @@ -25,6 +25,7 @@ from std/private/globs import nativeToUnixPath const exportSection = skField docCmdSkip = "skip" + DocColOffset = "## ".len # assuming that a space was added after ## type TSections = array[TSymKind, Rope] @@ -322,8 +323,12 @@ proc genComment(d: PDoc, n: PNode): string = when false: # RFC: to preseve newlines in comments, this would work: comment = comment.replace("\n", "\n\n") - renderRstToOut(d[], parseRst(comment, toFullPath(d.conf, n.info), toLinenumber(n.info), - toColumn(n.info), (var dummy: bool; dummy), d.options, d.conf), result) + renderRstToOut(d[], + parseRst(comment, toFullPath(d.conf, n.info), + toLinenumber(n.info), + toColumn(n.info) + DocColOffset, + (var dummy: bool; dummy), d.options, d.conf), + result) proc genRecCommentAux(d: PDoc, n: PNode): Rope = if n == nil: return nil |