pandoc-3.1.13: Conversion between markup formats

Copyright | Copyright (C) 2006-2023 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, ToSources a) => ReaderOptions -> a -> m Pandoc
- htmlTag :: forall st (m :: Type -> Type). (HasReaderOptions st, Monad m) => (Tag Text -> Bool) -> ParsecT Sources st m (Tag Text, Text)
- htmlInBalanced :: forall (m :: Type -> Type) st. Monad m => (Tag Text -> Bool) -> ParsecT Sources st m Text
- isInlineTag :: Tag Text -> Bool
- isBlockTag :: Tag Text -> Bool
- isTextTag :: Tag Text -> Bool
- isCommentTag :: Tag Text -> Bool
- toAttr :: [(Text, Text)] -> Attr

# Documentation

readHtml #

Arguments

:: (PandocMonad m, ToSources a) |
=> ReaderOptions | Reader options
-> a | Input to parse
-> m Pandoc |

Convert HTML-formatted string to `Pandoc` document.

htmlTag :: forall st (m :: Type -> Type). (HasReaderOptions st, Monad m) => (Tag Text -> Bool) -> ParsecT Sources st m (Tag Text, Text) #

Matches a tag meeting a certain condition.

htmlInBalanced :: forall (m :: Type -> Type) st. Monad m => (Tag Text -> Bool) -> ParsecT Sources st m Text #

Matches a stretch of HTML in balanced tags.

isInlineTag :: Tag Text -> Bool #

isBlockTag :: Tag Text -> Bool #

isTextTag :: Tag Text -> Bool #

isCommentTag :: Tag Text -> Bool #

toAttr :: [(Text, Text)] -> Attr #