diff --git a/config/nimdoc.cfg b/config/nimdoc.cfg
index 15f887023..162b2b4a3 100644
--- a/config/nimdoc.cfg
+++ b/config/nimdoc.cfg
@@ -46,13 +46,14 @@ doc.section.toc2 = """
# * $seeSrc: generated HTML from doc.item.seesrc (if some switches are used).
doc.item = """
-
+
$header
$deprecationMsg
$desc
$seeSrc
+
"""
# Chunk of HTML emitted for each entry in the HTML table of contents.
diff --git a/doc/nimdoc.css b/doc/nimdoc.css
index 5c2bf2093..4abea9ce0 100644
--- a/doc/nimdoc.css
+++ b/doc/nimdoc.css
@@ -234,6 +234,12 @@ select:focus {
}
/* Docgen styles */
+
+:target {
+ border: 2px solid #B5651D;
+ border-style: dotted;
+}
+
/* Links */
a {
color: var(--anchor);
diff --git a/nimdoc/test_out_index_dot_html/expected/index.html b/nimdoc/test_out_index_dot_html/expected/index.html
index fac758c9b..3499b5326 100644
--- a/nimdoc/test_out_index_dot_html/expected/index.html
+++ b/nimdoc/test_out_index_dot_html/expected/index.html
@@ -121,13 +121,14 @@ window.addEventListener('DOMContentLoaded', main);
-
+
proc foo() {....raises: [], tags: [].}
-
I do foo
+
diff --git a/nimdoc/testproject/expected/nimdoc.out.css b/nimdoc/testproject/expected/nimdoc.out.css
index 5c2bf2093..4abea9ce0 100644
--- a/nimdoc/testproject/expected/nimdoc.out.css
+++ b/nimdoc/testproject/expected/nimdoc.out.css
@@ -234,6 +234,12 @@ select:focus {
}
/* Docgen styles */
+
+:target {
+ border: 2px solid #B5651D;
+ border-style: dotted;
+}
+
/* Links */
a {
color: var(--anchor);
diff --git a/nimdoc/testproject/expected/subdir/subdir_b/utils.html b/nimdoc/testproject/expected/subdir/subdir_b/utils.html
index 533cb5b9d..47901ce0d 100644
--- a/nimdoc/testproject/expected/subdir/subdir_b/utils.html
+++ b/nimdoc/testproject/expected/subdir/subdir_b/utils.html
@@ -213,7 +213,7 @@ window.addEventListener('DOMContentLoaded', main);
-
+
SomeType = enum
enumValueA, enumValueB, enumValueC
-
@@ -221,101 +221,114 @@ window.addEventListener('DOMContentLoaded', main);
+
-
+
proc fn2() {....raises: [], tags: [].}
-
comment
-
+
+
proc fn3(): auto {....raises: [], tags: [].}
-
comment
-
+
+
proc fn4(): auto {....raises: [], tags: [].}
-
comment
-
+
+
proc fn5() {....raises: [], tags: [].}
-
comment
-
+
+
proc fn6() {....raises: [], tags: [].}
-
comment
-
+
+
proc fn7() {....raises: [], tags: [].}
-
comment
-
+
+
proc fn8(): auto {....raises: [], tags: [].}
-
comment
-
+
+
func fn9(a: int): int {....raises: [], tags: [].}
-
comment
-
+
+
func fn10(a: int): int {....raises: [], tags: [].}
-
comment
-
+
+
-
+
template aEnum(): untyped
-
-
+
+
template bEnum(): untyped
-
-
+
+
template fromUtilsGen(): untyped
-
@@ -324,6 +337,7 @@ should be shown in utils.html only
discard "should be in utils.html only, not in module that calls fromUtilsGen"
ditto
+
diff --git a/nimdoc/testproject/expected/testproject.html b/nimdoc/testproject/expected/testproject.html
index 0f6289bbc..d98b1b00f 100644
--- a/nimdoc/testproject/expected/testproject.html
+++ b/nimdoc/testproject/expected/testproject.html
@@ -447,7 +447,7 @@ window.addEventListener('DOMContentLoaded', main);
-
+
A {.inject.} = enum
aA
-
@@ -455,7 +455,8 @@ window.addEventListener('DOMContentLoaded', main);
The enum A.
-
+
+
B {.inject.} = enum
bB
-
@@ -463,7 +464,8 @@ The enum A.
The enum B.
-
+
+
Foo = enum
enumValueA2
-
@@ -471,7 +473,8 @@ The enum B.
-
+
+
FooBuzz {....deprecated: "FooBuzz msg".} = int
-
@@ -481,7 +484,8 @@ The enum B.
-
+
+
Shapes = enum
Circle,
Triangle,
@@ -491,64 +495,71 @@ The enum B.
Some shapes.
+
-
+
C_A = 0x7FF0000000000000'f64
-
-
+
+
+
+
-
+
proc addfBug14485() {....raises: [], tags: [].}
-
@@ -567,14 +578,16 @@ Some proc
]#
-
+
+
proc anything() {....raises: [], tags: [].}
-
There is no block quote after blank lines at the beginning.
-
+
+
proc asyncFun1(): Future[int] {....raises: [Exception, ValueError],
tags: [RootEffect].}
-
@@ -582,14 +595,16 @@ There is no block quote after blank lines at the beginning.
ok1
-
+
+
proc asyncFun2(): owned(Future[void]) {....raises: [Exception], tags: [RootEffect].}
-
-
+
+
proc asyncFun3(): owned(Future[void]) {....raises: [Exception], tags: [RootEffect].}
-
@@ -598,21 +613,24 @@ ok1
discard
ok1
-
+
+
proc bar[T](a, b: T): T
-
-
+
+
proc baz() {....raises: [], tags: [].}
-
-
+
+
proc baz[T](a, b: T): T {....deprecated.}
-
@@ -622,7 +640,8 @@ ok1
This is deprecated without message.
-
+
+
proc buzz[T](a, b: T): T {....deprecated: "since v0.20".}
-
@@ -632,7 +651,8 @@ This is deprecated without message.
This is deprecated with a message.
-
+
+
proc c_nonexistent(frmt: cstring): cint {.importc: "nonexistent",
header: "<stdio.h>", varargs, discardable.}
-
@@ -640,7 +660,8 @@ This is deprecated with a message.
-
+
+
proc c_printf(frmt: cstring): cint {.importc: "printf", header: "<stdio.h>",
varargs, discardable.}
-
@@ -648,7 +669,8 @@ This is deprecated with a message.
the c printf. etc.
-
+
+
proc fromUtils3() {....raises: [], tags: [].}
-
@@ -658,14 +680,16 @@ came form utils but should be shown where
-
+
+
+
proc low2[T: Ordinal | enum | range](x: T): T {.magic: "Low", noSideEffect.}
-
@@ -678,7 +702,8 @@ came form utils but should be shown where discard "in low2"
-
+
+
proc low[T: Ordinal | enum | range](x: T): T {.magic: "Low", noSideEffect.}
-
@@ -689,7 +714,8 @@ came form utils but should be shown where low(2)
-
+
+
proc p1() {....raises: [], tags: [].}
-
@@ -712,14 +738,16 @@ this is a nested doc comment
-
+
+
func someFunc() {....raises: [], tags: [].}
-
My someFunc. Stuff in quotes here. Some link
-
+
+
proc tripleStrLitTest() {....raises: [], tags: [].}
-
@@ -762,14 +790,16 @@ at indent 0
-
+
+
proc z1(): Foo {....raises: [], tags: [].}
-
cz1
-
+
+
proc z2() {....raises: [], tags: [].}
-
@@ -778,49 +808,56 @@ cz2
discard "in cz2"
-
+
+
proc z3() {....raises: [], tags: [].}
-
cz3
-
+
+
proc z4() {....raises: [], tags: [].}
-
cz4
-
+
+
proc z5(): int {....raises: [], tags: [].}
-
cz5
-
+
+
proc z6(): int {....raises: [], tags: [].}
-
cz6
-
+
+
proc z7(): int {....raises: [], tags: [].}
-
cz7
-
+
+
proc z8(): int {....raises: [], tags: [].}
-
cz8
-
+
+
proc z9() {....raises: [], tags: [].}
-
@@ -829,7 +866,8 @@ cz8
doAssert 1 + 1 == 2
-
+
+
proc z10() {....raises: [], tags: [].}
-
@@ -838,7 +876,8 @@ cz8
discard 1
cz10
-
+
+
proc z11() {....raises: [], tags: [].}
-
@@ -847,7 +886,8 @@ cz8
discard 1
-
+
+
proc z12(): int {....raises: [], tags: [].}
-
@@ -856,7 +896,8 @@ cz8
discard 1
-
+
+
proc z13() {....raises: [], tags: [].}
-
@@ -865,7 +906,8 @@ cz13
discard
-
+
+
proc z17() {....raises: [], tags: [].}
-
@@ -874,38 +916,42 @@ cz17 rest
discard 1
rest
+
-
+
method method1(self: Moo) {.base, ...raises: [], tags: [].}
-
foo1
-
+
+
method method2(self: Moo): int {.base, ...raises: [], tags: [].}
-
foo2
-
+
+
method method3(self: Moo): int {.base, ...raises: [], tags: [].}
-
foo3
+
-
+
iterator fromUtils1(): int {....raises: [], tags: [].}
-
@@ -916,14 +962,16 @@ foo3
-
+
+
iterator iter1(n: int): int {....raises: [], tags: [].}
-
foo1
-
+
+
iterator iter2(n: int): int {....raises: [], tags: [].}
-
@@ -932,19 +980,21 @@ foo2
discard
+
-
+
+
macro z16()
-
@@ -955,26 +1005,29 @@ foo2
doAssert 2 == 1 + 1
-
+
+
-
+
+
template fromUtils2()
-
@@ -984,7 +1037,8 @@ ok3
in module calling fromUtilsGen"""
-
+
+
template myfn()
-
@@ -1006,7 +1060,8 @@ bar
should be still in
-
+
+
+
template z6t(): int
-
cz6t
-
+
+
template z14()
-
@@ -1031,7 +1088,8 @@ cz14
discard
-
+
+
template z15()
-
@@ -1048,6 +1106,7 @@ cz15
discard 1
in or out?
+