Copyright | (c) 2023 Amy de Buitléir |
---|---|
License | GPL-3.0-only |
Maintainer | amy@nualeargais.ie |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Text.Pandoc.Query
Description
See https://github.com/mhwombat/pandoc-maths-web for information on how to use this filter.
Synopsis
- transform :: [Pandoc] -> Pandoc -> IO Pandoc
- data Query = Query Expression Formatter SortOrder
- data Formatter = ParseFromMarkdown Text
- data Expression
- data SortOrder
- satisfies :: Pandoc -> Expression -> Bool
Documentation
transform :: [Pandoc] -> Pandoc -> IO Pandoc Source #
Replaces any executable queries in a Pandoc document with the formatted result of the query.
Represents an executable query and specifies how to format the results.
Constructors
Query Expression Formatter SortOrder |
Specifies how to format the query results. Currently results can only be specified using markdown syntax. However, the query results will be parsed into Pandoc's native format and inserted into the document. So the resulting document can be output in any format supported by Pandoc.
Constructors
ParseFromMarkdown Text |
data Expression Source #
Document filter for query.
Constructors
MetaValueIs Text Text | |
MetaValueIncludes Text Text | |
All | |
And Expression Expression | |
Or Expression Expression | |
Not Expression |
Instances
Read Expression Source # | |
Defined in Text.Pandoc.Query Methods readsPrec :: Int -> ReadS Expression # readList :: ReadS [Expression] # readPrec :: ReadPrec Expression # readListPrec :: ReadPrec [Expression] # | |
Show Expression Source # | |
Defined in Text.Pandoc.Query Methods showsPrec :: Int -> Expression -> ShowS # show :: Expression -> String # showList :: [Expression] -> ShowS # |