summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hs/src/Html.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/hs/src/Html.hs b/hs/src/Html.hs
index 24eb395..57a132b 100644
--- a/hs/src/Html.hs
+++ b/hs/src/Html.hs
@@ -94,10 +94,11 @@ mailRewriter mu4eURL body uri = (body, conv $ mu4eURL <> "?id=" <> uriPath uri)
urlRewrites :: Configuration -> Map String ([Inline] -> URI -> ([Inline], PandocStr))
urlRewrites conf = M.fromList $ (maybeToList $ ((,) "mail") . mailRewriter <$> (conf ^. output . mu4eURL))
- -- TODO choose man implementation from
- -- configuration item
- ++ [("man", manRewriter $ mannedMan)]
- -- , ("man", manRewriter $ (rewriters ! (fromJust $ conf ^. output . manProvider)))
+ -- TODO include descriptive text from
+ -- original link
+ ++ case (conf ^. output . manProvider) >>= ((flip M.lookup) rewriters) of
+ Just impl -> [("man", manRewriter $ impl)]
+ Nothing -> []
fixExtension url