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

Expander/collapser ids can conflict to easily #953

Closed
harpocrates opened this issue Oct 25, 2018 · 3 comments · Fixed by #954
Closed

Expander/collapser ids can conflict to easily #953

harpocrates opened this issue Oct 25, 2018 · 3 comments · Fixed by #954
Assignees
Labels

Comments

@harpocrates
Copy link
Collaborator

We do some work to generate HTML id's in a deterministic fashion. However, we're not trying hard enough to make them unique. Here's an example:

module Bug953 where

{- | A foo

==== __Examples__

Foo example body
-}
data Foo = Foo'

{- | A bar

==== __Examples__

Bar example body
-}
data Bar = Bar'

It is impossible to expand the first example section (clicking on the plus expands the second section!) because the two generated HTML elements are given the same ch:noid:0 id.

@harpocrates harpocrates self-assigned this Oct 25, 2018
@harpocrates
Copy link
Collaborator Author

@sjakobi This is what is causing the example section of data [] a to be unexpandable (the Either example gets expanded instead 😄).

harpocrates added a commit to harpocrates/haddock that referenced this issue Oct 25, 2018
This fixes haskell#953 by passing more names into the generated ids.
harpocrates added a commit that referenced this issue Oct 26, 2018
This fixes #953 by passing more names into the generated ids.
@Lysxia
Copy link
Contributor

Lysxia commented Feb 19, 2020

I think I just got bitten by this: https://hackage.haskell.org/package/generic-data-0.8.0.0/docs/Generic-Data.html#t:FiniteEnum The "Details" link expands an Example link down below instead.

  1. Is this the same issue?
  2. Is it fixed by the fix that closed this issue?
  3. How often does Hackage update Haddock?

@bgamari
Copy link
Collaborator

bgamari commented Feb 19, 2020

Hackage documentation is regenerated every time a package is uploaded.

However, haddock on the builder is uploaded significantly less frequently. I suspect it hasn't happened since this was fixed. I can check whether I still have permission to do so and will update it if so.

alanz pushed a commit that referenced this issue Mar 25, 2020
This fixes #953 by passing more names into the generated ids.
hubot pushed a commit to ghc/ghc that referenced this issue May 17, 2024
This fixes haskell/haddock#953 by passing more names into the generated ids.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants