diff --git a/src/Main.hs b/src/Main.hs index 4fa24f0..44c03d3 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -16,7 +16,6 @@ import Text.HTML.TagSoup import Text.Pandoc.Walk import Text.Pandoc.JSON - main :: IO () main = toJSONFilter linkDocument @@ -63,6 +62,8 @@ parseSymbolRefs = go mempty . concat . mapMaybe getHTML where getHTML :: Block -> Maybe ([Tag Text]) getHTML (RawBlock (Format x) xs) | x == "html" = Just (concatMap parseTags' (parseTags xs)) + getHTML (BlockQuote bs) = pure . concat $ mapMaybe getHTML bs + getHTML (Div _ bs) = pure . concat $ mapMaybe getHTML bs getHTML _ = Nothing parseTags' (TagComment x) = parseTags x >>= parseTags' @@ -86,4 +87,4 @@ parseSymbolRefs = go mempty . concat . mapMaybe getHTML where go map [] = map addIfNotPresent :: Text -> v -> HashMap Text v -> HashMap Text v -addIfNotPresent = HashMap.insertWith (\_ old -> old) \ No newline at end of file +addIfNotPresent = HashMap.insertWith (\_ old -> old)