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
508508If you use section headings, then Haddock will generate a table of
509509contents at the top of the module documentation for you.
510510
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 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+
511524The alternative style of placing the commas at the beginning of each
512525line is also supported. e.g.: ::
513526
@@ -1150,6 +1163,8 @@ Inspired by reSTs grid tables Haddock supports a complete table representation v
11501163 -- | body row 4 | | \] |
11511164 -- +------------------------+------------+---------------------+
11521165
1166+ .. _anchors :
1167+
11531168Anchors
11541169~~~~~~~
11551170
You can’t perform that action at this time.
0 commit comments