pandoc-2.5: Conversion between markup formats

Copyright | Copyright (C) 2006-2018 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 String -> Bool) -> ParserT [Char] st m (Tag String, String)
- htmlInBalanced :: (HasReaderOptions st, Monad m) => (Tag String -> Bool) -> ParserT String st m String
- 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

readHtml Source #

Arguments

:: PandocMonad m |
=> ReaderOptions | Reader options
-> Text | String to parse (assumes `'\n'` line endings)
-> m Pandoc |

Convert HTML-formatted string to `Pandoc` document.

htmlTag :: (HasReaderOptions st, Monad m) => (Tag String -> Bool) -> ParserT [Char] st m (Tag String, String) Source #

Matches a tag meeting a certain condition.

htmlInBalanced :: (HasReaderOptions st, Monad m) => (Tag String -> Bool) -> ParserT String st m String Source #

Matches a stretch of HTML in balanced tags.

isInlineTag :: NamedTag (Tag a) => Tag a -> Bool Source #

isBlockTag :: NamedTag (Tag a) => Tag a -> Bool Source #

class NamedTag a where Source #

Methods

getTagName :: a -> Maybe Text Source #

Instances

NamedTag (Tag String) Source # |
Instance details Defined in Text.Pandoc.Readers.HTML Methods getTagName :: Tag String -> Maybe Text Source #
NamedTag (Tag Text) Source # |
Instance details Defined in Text.Pandoc.Readers.HTML Methods getTagName :: Tag Text -> Maybe Text Source #

isTextTag :: Tag a -> Bool Source #

isCommentTag :: Tag a -> Bool Source #