diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-02-08 12:54:33 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2021-02-08 12:54:33 -0500 |
commit | e57d82dde105ffbfcb27ab261041c97b4dd0150a (patch) | |
tree | e4716c076ef5f05d63235bbf475f939fa1ed402f /haddock-api/src/Haddock/Backends/LaTeX.hs | |
parent | b995bfe84f9766e23ff78d7ccd520ec7d8cdbebc (diff) | |
parent | 4f1a309700106b62831309931e449a603093f521 (diff) |
Merge remote-tracking branch 'upstream/ghc-head' into ghc-head
Diffstat (limited to 'haddock-api/src/Haddock/Backends/LaTeX.hs')
-rw-r--r-- | haddock-api/src/Haddock/Backends/LaTeX.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Backends/LaTeX.hs b/haddock-api/src/Haddock/Backends/LaTeX.hs index 5b27847e..df1f94e6 100644 --- a/haddock-api/src/Haddock/Backends/LaTeX.hs +++ b/haddock-api/src/Haddock/Backends/LaTeX.hs @@ -1241,7 +1241,12 @@ latexMarkup = Markup , markupAppend = \l r v -> l v . r v , markupIdentifier = \i v -> inlineElem (markupId v (fmap occName i)) , markupIdentifierUnchecked = \i v -> inlineElem (markupId v (fmap snd i)) - , markupModule = \m _ -> inlineElem (let (mdl,_ref) = break (=='#') m in (tt (text mdl))) + , markupModule = + \(ModLink m mLabel) v -> + case mLabel of + Just lbl -> inlineElem . tt $ lbl v empty + Nothing -> inlineElem (let (mdl,_ref) = break (=='#') m + in (tt (text mdl))) , markupWarning = \p v -> p v , markupEmphasis = \p v -> inlineElem (emph (p v empty)) , markupBold = \p v -> inlineElem (bold (p v empty)) |