This repository was archived by the owner on Aug 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -508,6 +508,19 @@ on, where the number of ``*``\ s indicates the level of the heading
508
508
If you use section headings, then Haddock will generate a table of
509
509
contents at the top of the module documentation for you.
510
510
511
+ By default, when generating HTML documentation Haddock will create an
512
+ anchor to each section of the form ``#g:n ``, where ``n `` is an integer
513
+ that might change as the you add new section headings. If you want to
514
+ create stable links, you can add an explicit anchor (see
515
+ :ref: `anchors `) after the section heading: ::
516
+
517
+ module Foo (
518
+ -- * Classes #classes#
519
+ C(..)
520
+ ) where
521
+
522
+ This will create an HTML anchor ``#g:classes `` to the section.
523
+
511
524
The alternative style of placing the commas at the beginning of each
512
525
line is also supported. e.g.: ::
513
526
@@ -1150,6 +1163,8 @@ Inspired by reSTs grid tables Haddock supports a complete table representation v
1150
1163
-- | body row 4 | | \] |
1151
1164
-- +------------------------+------------+---------------------+
1152
1165
1166
+ .. _anchors :
1167
+
1153
1168
Anchors
1154
1169
~~~~~~~
1155
1170
You can’t perform that action at this time.
0 commit comments