From 1b6bcd62e7f5534be45a0d5737b76d181c2d934b Mon Sep 17 00:00:00 2001 From: Phil Ruffwind Date: Wed, 30 Sep 2015 02:22:43 -0400 Subject: Move the permalinks to "#" on the right side Since pull request #407, the identifiers have been permalinked to themselves, but this makes it difficult to copy the identifier by double-clicking. To work around this usability problem, the permalinks are now placed on the far right adjacent to "Source", indicated by "#". Also, 'namedAnchor' now uses 'id' instead of 'name' (which is obsolete). --- haddock-api/src/Haddock/Backends/Xhtml/Names.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'haddock-api/src/Haddock/Backends/Xhtml/Names.hs') diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Names.hs b/haddock-api/src/Haddock/Backends/Xhtml/Names.hs index c69710d1..5492178b 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml/Names.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Names.hs @@ -120,11 +120,11 @@ ppBinderWith :: Notation -> Bool -> OccName -> Html -- the documentation or is the actual definition; in the latter case, we also -- set the 'id' and 'class' attributes. ppBinderWith notation isRef n = - linkedAnchor name ! attributes << ppBinder' notation n + makeAnchor << ppBinder' notation n where name = nameAnchorId n - attributes | isRef = [] - | otherwise = [identifier name, theclass "def"] + makeAnchor | isRef = linkedAnchor name + | otherwise = namedAnchor name ! [theclass "def"] ppBinder' :: Notation -> OccName -> Html ppBinder' notation n = wrapInfix notation n $ ppOccName n -- cgit v1.2.3