pandoc-3.10: Conversion between markup formats

Copyright | Copyright (C) 2006-2024 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 Source #

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) Source #

Matches a tag meeting a certain condition.

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

Matches a stretch of HTML in balanced tags.

isInlineTag :: Tag Text -> Bool Source #

isBlockTag :: Tag Text -> Bool Source #

isTextTag :: Tag Text -> Bool Source #

isCommentTag :: Tag Text -> Bool Source #

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