mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-24 01:06:30 +00:00
Lua module: provide simple read format parser
A single `read` function parsing pandoc-supported formats is added to the module. This is simpler and more convenient than the previous method of exposing all reader functions individually.
This commit is contained in:
committed by
Albert Krewinkel
parent
c2567b2bd0
commit
24ef672132
@@ -2,7 +2,8 @@ return {
|
||||
{
|
||||
RawBlock = function (elem)
|
||||
if elem.format == "markdown" then
|
||||
return pandoc.reader.markdown.read_block(elem.text)
|
||||
local pd = pandoc.read(elem.text, "markdown")
|
||||
return pd.blocks[1]
|
||||
else
|
||||
return elem
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user