diff options
author | defanor <defanor@uberspace.net> | 2017-10-26 20:07:10 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2017-10-26 20:07:10 +0300 |
commit | a3df7b27878edbf2d28f9c8d1aeb92788fa3bfd7 (patch) | |
tree | 78eb691b90de9cd71d8e50afca862a53c273c37e /Pancake.hs | |
parent | 178e8328df38d67cef388eabe4de19469aadc1e8 (diff) |
Don't store or count fragment links
It doesn't make much difference, but would provide nicer enumeration.
Diffstat (limited to 'Pancake.hs')
-rw-r--r-- | Pancake.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -272,7 +272,6 @@ readInline (P.RawInline _ s) = pure . pure $ fromString s readInline (P.Link _ alt (url, title)) = case parseURIReference url of Just uri -> do - cnt <- storeLink uri a <- mapM readInline alt let t = case (title, a) of ("", []) -> [fromString url] @@ -283,7 +282,8 @@ readInline (P.Link _ alt (url, title)) = -- fragment links are mostly useless here, at least for now. -- but still marking them as links, to avoid confusion. (URI "" Nothing "" "" _) -> pure $ map (Fg DullCyan) t - _ -> pure $ map (Fg Cyan) t ++ [Fg Blue (mconcat ["[", fromString $ show cnt, "]"])] + _ -> storeLink uri >>= + \cnt -> pure $ map (Fg Cyan) t ++ [Fg Blue (mconcat ["[", fromString $ show cnt, "]"])] Nothing -> pure . pure $ fromString title readInline (P.Image attr alt (url, title)) = do asLink <- readInline (P.Link attr alt (url, title)) |