Skip to content

Commit

Permalink
doc/lua-filters.md: add documentation for pandoc.format
Browse files Browse the repository at this point in the history
  • Loading branch information
tarleb committed Dec 3, 2022
1 parent c5beb1d commit b34ec00
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
41 changes: 41 additions & 0 deletions doc/lua-filters.md
Expand Up @@ -4271,6 +4271,47 @@ Parameters:
`comp`
: Comparison function as described above.

# Module pandoc.format

Information about the formats supported by pandoc.

## Functions {#pandoc.format-functions}

### all_extensions {#pandoc.format.default_extensions}

`all_extensions (format)`

Returns the list of all valid extensions for a format. No
distinction is made between input and output; an extension can
have an effect when reading a format but not when writing it, or
*vice versa*.

Parameters:

`format`
: format name (string)

Returns:

- all extensions supported for `format` (FormatExtensions)

### default_extensions {#pandoc.format.default_extensions}

`default_extensions (format)`

Returns the list of default extensions of the given format; this
function does not check if the format is supported, it will return
a fallback list of extensions even for unknown formats.

Parameters:

`format`
: format name (string)

Returns:

- default extensions enabled for `format` (FormatExtensions)

# Module pandoc.path

Module for file path manipulations.
Expand Down
4 changes: 2 additions & 2 deletions pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Format.hs
Expand Up @@ -52,8 +52,8 @@ functions =
"all extensions supported for `format`"
#? T.unlines
[ "Returns the list of all valid extensions for a format."
, "No distinction is made between input and output, and an"
, "extension have an effect when reading a format but not when"
, "No distinction is made between input and output; an extension"
, "can have an effect when reading a format but not when"
, "writing it, or *vice versa*."
]
]

0 comments on commit b34ec00

Please sign in to comment.