aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2022-05-30 22:17:37 +1000
committerYuchen Pei <hi@ypei.me>2022-05-30 22:17:37 +1000
commit08fc677a8db69259c3c91070b6a63ac46f93667e (patch)
treeaaaf2a220606f6755d393633001c8df70317932a
parent5e9bed488149f36ed7c2a6a0e58cb0e5c90e1d37 (diff)
fixing links
-rw-r--r--src/F2Md/Import.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/F2Md/Import.hs b/src/F2Md/Import.hs
index eb6d014..bb37025 100644
--- a/src/F2Md/Import.hs
+++ b/src/F2Md/Import.hs
@@ -97,15 +97,15 @@ formatBody :: Maybe Text -> Maybe (Text, Maybe Text, Maybe Integer) -> Maybe Tex
formatBody link encl desc =
let linkText = case link of
Nothing -> ""
- Just link' -> "Link: <" <> link' <> ">\n\n"
+ Just link' -> "<a href='" <> link' <> "'>Link</a>\n"
enclText = case encl of
Nothing -> ""
- Just (url, Nothing, Nothing) -> urlPt url <> "\n\n"
- Just (url, Just ty, Nothing) -> urlPt url <> " (" <> ty <> ")\n\n"
- Just (url, Nothing, Just len) -> urlPt url <> " (" <> lenPt len <> ")\n\n"
+ Just (url, Nothing, Nothing) -> urlPt url <> "\n"
+ Just (url, Just ty, Nothing) -> urlPt url <> " (" <> ty <> ")\n"
+ Just (url, Nothing, Just len) -> urlPt url <> " (" <> lenPt len <> ")\n"
Just (url, Just ty, Just len) ->
- urlPt url <> " (" <> ty <> ", " <> lenPt len <> ")\n\n"
- where urlPt url = "Enclosure: <" <> url <> ">"
+ urlPt url <> " (" <> ty <> ", " <> lenPt len <> ")\n"
+ where urlPt url = "<a href='" <> url <> "'>Enclosure</a>"
lenPt len = T.pack (show len) <> " bytes"
in
linkText <> enclText <> fromMaybe "" desc