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

Unexpected result when using closing backtick for hyperlinked identifiers that end with single quote #1593

Closed
Flupp opened this issue May 3, 2023 · 2 comments

Comments

@Flupp
Copy link

Flupp commented May 3, 2023

With Haddock 2.25.1, when using a closing backtick for hyperlinking an identifier that ends in a single quote, the single quote seems to be considered as the closing hyperlink markup instead of the backtick. For example:

-- |
--
-- no prime
--
-- - 'foo' works
-- - `foo' works
-- - 'foo` works
-- - `foo` works
--
-- one prime
--
-- - 'foo'' works
-- - `foo'' works
-- - 'foo'` broken
-- - `foo'` broken
--
-- two primes
--
-- - 'foo''' works
-- - `foo''' works
-- - 'foo''` broken
-- - `foo''` broken
--
--  middle prime
--
-- - 'foo'bar' works
-- - `foo'bar' works
-- - 'foo'bar` works
-- - `foo'bar` works
--
-- infix, no prime
--
-- - '`foo`' works
-- - ``foo`' works
-- - '`foo`` works
-- - ``foo`` works
--
-- infix, one prime
--
-- - '`foo'`' broken
-- - ``foo'`' broken
-- - '`foo'`` broken
-- - ``foo'`` broken
--
-- infix, two primes
--
-- - '`foo''`' broken
-- - ``foo''`' broken
-- - '`foo''`` broken
-- - ``foo''`` broken
--
--  infix, middle prime
--
-- - '`foo'bar`' works
-- - ``foo'bar`' works
-- - '`foo'bar`` works
-- - ``foo'bar`` works
module MyLib where

foo = undefined

foo' = undefined

foo'' = undefined

foo'bar = undefined

results in:
Screenshot_20230503_194452

@Kleidukos
Copy link
Member

Hi, thank you for this ticket, but Haddock now lives full-time in the GHC repository!
Read more at https://discourse.haskell.org/t/haddock-now-lives-in-the-ghc-repository/9576.

Let me know if you feel it is still needed, and I'll migrate it. :)

@Flupp
Copy link
Author

Flupp commented May 22, 2024

I just checked with Haddock version 2.28.0 (GHC 9.10.1). With that, “one prime” and and “two primes” do work, however, “infix, one prime” and “infix, two primes” remain broken. That’s probably good enough in practice. I’ll leave it up to you to decide if this is still a relevant problem or not.

Screenshot_20240522_142950

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

No branches or pull requests

2 participants