Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links to sections #193

Open
ghc-mirror opened this issue May 8, 2014 · 3 comments
Open

Links to sections #193

ghc-mirror opened this issue May 8, 2014 · 3 comments
Assignees

Comments

@ghc-mirror
Copy link

Original reporter: sol@

It would be nice if we could link to certain sections withing a document.

Example:

module Foo (
-- * Foo
..
..
-- * Bar
-- | Read more in [Foo]
..
..
) where

As a precondition, we would need a way to address section in a unique manner.

This is somewhat related to #190 (both, #190 and this, require syntax extensions for new kinds of links).

@ghc-mirror ghc-mirror self-assigned this May 8, 2014
@ghc-mirror
Copy link
Author

Original reporter: sol@

We already almost have this (3.8.12. Anchors), but from what I can tell, it's broken. Creating anchors with #label# still works, but module names in angel brackets are not treated any special (contrary to what the documentation claims).

@philderbeast
Copy link
Contributor

I agree that;

module names in angel brackets are not treated any special (contrary to what the documentation claims).

If I write <Flight.Kml#range fixesLength> or <Flight.Kml\#range fixesLength> the link is to;

/doc/html/flight-kml/Flight.Kml#range

When the link that I'm trying to generate is;

/doc/html/flight-kml/Flight-Kml.html#range.

Here's the relevant section of the docs;

To link to an anchor from elsewhere, use the syntax "module#label" where module is the module name containing the anchor, and label is the anchor label. The module does not have to be local, it can be imported via an interface. Please note that in Haddock versions 2.13.x and earlier, the syntax was "module#label". It is considered deprecated and will be removed in the future.

@shlevy
Copy link

shlevy commented Sep 28, 2022

Any thoughts on this? Bit by it today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants