Skip to content

Commit

Permalink
feat: Extend pandoc builtins with globals used to create filters
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Aug 28, 2024
1 parent 7e4f22e commit edd9456
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/luacheck/builtin_standards/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,20 @@ builtin_standards.sile = {
-- https://pandoc.org/lua-filters.html#global-variables
builtin_standards.pandoc = {
globals = {
-- Global modules
"pandoc", "lpeg", "re",
"PANDOC_READER_OPTIONS", "PANDOC_WRITER_OPTIONS", "PANDOC_VERSION", "PANDOC_API_VERSION", "PANDOC_SCRIPT_FILE", "PANDOC_STATE",
-- Global variables passed to filters
"FORMAT", "PANDOC_READER_OPTIONS", "PANDOC_WRITER_OPTIONS", "PANDOC_VERSION", "PANDOC_API_VERSION",
"PANDOC_SCRIPT_FILE", "PANDOC_STATE",
-- Globals that can be used to create filter elements
-- - top level
"Inlines", "Inline", "Blocks", "Block", "Meta", "Pandoc",
-- - inline
"Cite", "Code", "Emph", "Image", "LineBreak", "Link", "Math", "Note", "Quoted", "RawInline", "SmallCaps",
"SoftBreak", "Space", "Span", "Str", "Strikeout", "Strong", "Subscript", "Superscript", "Underline",
-- - block
"BlockQuote", "BulletList", "CodeBlock", "DefinitionList", "Div", "Figure", "Header", "HorizontalRule",
"LineBlock", "OrderedList", "Para", "Plain", "RawBlock", "Table",
}
}

Expand Down

0 comments on commit edd9456

Please sign in to comment.