@@ -1344,6 +1344,81 @@ Lua functions for pandoc scripts.
1344 -- the above is equivalent to
1344 -- the above is equivalent to
1345 -- return {{Str = Str}}
1345 -- return {{Str = Str}}
1347+[`pipe (command, args, input)`]{#pipe}
1349+: Runs command with arguments, passing it some input, and
1350+ returns the output.
1354+ - Output of command.
1358+ - A table containing the keys `command`, `error_code`, and
1359+ `output` is thrown if the command exits with a non-zero
1364+ local output = pandoc.pipe("sed", {"-e","s/a/b/"}, "abc")
1366+[`walk_block (element, filter)`]{#walk_block}
1368+: Apply a filter inside a block element, walking its
1374+ : the block element
1377+ : a lua filter (table of functions) to be applied
1378+ within the block element
1380+ Returns: the transformed block element
1382+[`walk_inline (element, filter)`]{#walk_inline}
1384+: Apply a filter inside an inline element, walking its
1390+ : the inline element
1393+ : a lua filter (table of functions) to be applied
1394+ within the inline element
1396+ Returns: the transformed inline element
1398+[`read (markup[, format])`]{#read}
1400+: Parse the given string into a Pandoc document.
1405+ : the markup to be parsed
1408+ : format specification, defaults to \"markdown\".
1410+ Returns: pandoc document
1414+ local org_markup = "/emphasis/" -- Input to be read
1415+ local document = pandoc.read(org_markup, "org")
1416+ -- Get the first block of the document
1417+ local block = document.blocks[1]
1418+ -- The inline element in that block is an `Emph`
1419+ assert(block.content[1].t == "Emph")
1347# Module pandoc.utils
1422# Module pandoc.utils
1349This module exposes internal pandoc functions and utility
1424This module exposes internal pandoc functions and utility