diff options
author | Iñaki <1238558+garetxe@users.noreply.github.com> | 2020-04-25 23:38:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-25 18:38:11 -0400 |
commit | 3c9e8081228ffcc38c760a6d9501a626071a5105 (patch) | |
tree | a2adb031d6fe8e5dd20e0c0c263fd872347e7c09 /html-test | |
parent | 5bc5016a14bc872a8315cddc629f8171a9ccd62e (diff) |
Add support for custom section anchors (#1179)
This allows to have stable anchors for groups, even if the set of
groups in the documentation is altered.
The syntax for setting the anchor of a group is
-- * Group name #desiredAnchor#
Which will produce an html anchor of the form '#g:desiredAnchor'
Co-authored-by: Iñaki García Etxebarria <git@inaki.blueleaf.cc>
Diffstat (limited to 'html-test')
-rw-r--r-- | html-test/ref/SectionLabels.html | 91 | ||||
-rw-r--r-- | html-test/src/SectionLabels.hs | 8 |
2 files changed, 99 insertions, 0 deletions
diff --git a/html-test/ref/SectionLabels.html b/html-test/ref/SectionLabels.html new file mode 100644 index 00000000..4581082e --- /dev/null +++ b/html-test/ref/SectionLabels.html @@ -0,0 +1,91 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" +><head + ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" + /><meta name="viewport" content="width=device-width, initial-scale=1" + /><title + >SectionLabels</title + ><link href="#" rel="stylesheet" type="text/css" title="Linuwial" + /><link rel="stylesheet" type="text/css" href="#" + /><link rel="stylesheet" type="text/css" href="#" + /><script src="haddock-bundle.min.js" async="async" type="text/javascript" + ></script + ><script type="text/x-mathjax-config" + >MathJax.Hub.Config({ tex2jax: { processClass: "mathjax", ignoreClass: ".*" } });</script + ><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript" + ></script + ></head + ><body + ><div id="package-header" + ><span class="caption empty" + > </span + ><ul class="links" id="page-menu" + ><li + ><a href="#" + >Contents</a + ></li + ><li + ><a href="#" + >Index</a + ></li + ></ul + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >Safe-Inferred</td + ></tr + ></table + ><p class="caption" + >SectionLabels</p + ></div + ><div id="table-of-contents" + ><div id="contents-list" + ><p class="caption" onclick="window.scrollTo(0,0)" + >Contents</p + ><ul + ><li + ><a href="#" + >Section heading</a + ></li + ></ul + ></div + ></div + ><div id="synopsis" + ><details id="syn" + ><summary + >Synopsis</summary + ><ul class="details-toggle" data-details-id="syn" + ><li class="src short" + ><a href="#" + >n</a + > :: <a href="#" title="Data.Int" + >Int</a + ></li + ></ul + ></details + ></div + ><div id="interface" + ><a href="#" id="g:custom" + ><h1 + >Section heading</h1 + ></a + ><div class="top" + ><p class="src" + ><a id="v:n" class="def" + >n</a + > :: <a href="#" title="Data.Int" + >Int</a + > <a href="#" class="selflink" + >#</a + ></p + ></div + ></div + ></div + ></body + ></html +> diff --git a/html-test/src/SectionLabels.hs b/html-test/src/SectionLabels.hs new file mode 100644 index 00000000..560bafa4 --- /dev/null +++ b/html-test/src/SectionLabels.hs @@ -0,0 +1,8 @@ +module SectionLabels + ( + -- * Section heading#custom# + n + ) where + +n :: Int +n = 3 |