Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Add support for custom section anchors #1179

Merged
merged 3 commits into from
Apr 25, 2020

Conversation

garetxe
Copy link
Contributor

@garetxe garetxe commented Apr 25, 2020

As discussed in #1164

Iñaki García Etxebarria added 2 commits April 25, 2020 14:17
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'
@harpocrates
Copy link
Collaborator

Thank you putting this together, it looks great. Before merging, do you think you could add something about this in the Haddock manual around here: https://github.com/haskell/haddock/blob/ghc-8.10/doc/markup.rst#section-headings?

@garetxe
Copy link
Contributor Author

garetxe commented Apr 25, 2020

Thanks for taking a look! I just added some documentation for this in c355db9. I would be happy to change it if you think of a better way to document the change.

@garetxe
Copy link
Contributor Author

garetxe commented Apr 25, 2020

Sorry, noticed a typo, should be better now.

@harpocrates harpocrates merged commit 3c9e808 into haskell:ghc-8.10 Apr 25, 2020
@harpocrates
Copy link
Collaborator

Looks great, thank you for putting this all together. 👍

@garetxe
Copy link
Contributor Author

garetxe commented Apr 26, 2020

Great, thanks a lot!

alexbiehl-gc pushed a commit to alexbiehl/haddock that referenced this pull request Dec 8, 2020
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 <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants