Copyright | Copyright (C) 2006-2020 John MacFarlane |
---|---|
License | GNU GPL, version 2 or above |
Maintainer | John MacFarlane <jgm@berkeley.edu> |
Stability | alpha |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Text.Pandoc.Readers.HTML
Description
Conversion of HTML to Pandoc
document.
Synopsis
- readHtml :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
- htmlTag :: (HasReaderOptions st, Monad m) => (Tag Text -> Bool) -> ParserT Text st m (Tag Text, Text)
- htmlInBalanced :: Monad m => (Tag Text -> Bool) -> ParserT Text st m Text
- isInlineTag :: NamedTag (Tag a) => Tag a -> Bool
- isBlockTag :: NamedTag (Tag a) => Tag a -> Bool
- class NamedTag a where
- getTagName :: a -> Maybe Text
- isTextTag :: Tag a -> Bool
- isCommentTag :: Tag a -> Bool
Documentation
Arguments
:: PandocMonad m | |
=> ReaderOptions | Reader options |
-> Text | String to parse (assumes |
-> m Pandoc |
Convert HTML-formatted string to Pandoc
document.
htmlTag :: (HasReaderOptions st, Monad m) => (Tag Text -> Bool) -> ParserT Text st m (Tag Text, Text) #
Matches a tag meeting a certain condition.
htmlInBalanced :: Monad m => (Tag Text -> Bool) -> ParserT Text st m Text #
Matches a stretch of HTML in balanced tags.
isInlineTag :: NamedTag (Tag a) => Tag a -> Bool #
isBlockTag :: NamedTag (Tag a) => Tag a -> Bool #
Methods
getTagName :: a -> Maybe Text #
Instances
NamedTag (Tag String) # | |
Defined in Text.Pandoc.Readers.HTML Methods getTagName :: Tag String -> Maybe Text # | |
NamedTag (Tag Text) # | |
Defined in Text.Pandoc.Readers.HTML Methods getTagName :: Tag Text -> Maybe Text # |
isCommentTag :: Tag a -> Bool #