Skip to content

Commit

Permalink
refactor(packages): Realign markdown package with lunamark
Browse files Browse the repository at this point in the history
  • Loading branch information
Omikhleia authored and Didier Willis committed Jul 23, 2022
1 parent 2f52ede commit 4d739be
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/markdown/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ local function lunamarkAST2SILE (options)
writer.paragraph = simpleCommandWrapper("markdown:internal:paragraph")
writer.code = simpleCommandWrapper("code")
writer.emphasis = simpleCommandWrapper("em")
writer.strikethrough = simpleCommandWrapper("strikethrough")
writer.strikeout = simpleCommandWrapper("strikethrough")
writer.subscript = simpleCommandWrapper("textsubscript")
writer.superscript = simpleCommandWrapper("textsuperscript")
writer.blockquote = simpleCommandWrapper("blockquote", "markdown:blockquote:fallback")
Expand Down Expand Up @@ -293,7 +293,7 @@ local function lunamarkAST2SILE (options)
-- AST command structures in place of some ropes.
-- Therefore, we now walk the AST and merge it, flattened to some degree.

function writer.merge (rope)
function writer.rope_to_output (rope)
local function walk(node)
local out
local ropeType = type(node)
Expand Down Expand Up @@ -379,11 +379,18 @@ local function init (class, _)
})
local parse = reader.new(writer, {
smart = true,
strikeout = true,
subscript=true,
superscript = true,
definition_lists = true,
notes = true,
inline_notes = true,
fenced_code_blocks = true,
pandoc_extensions = true,
fenced_code_attributes = true,
bracketed_spans = true,
fenced_divs = true,
raw_attribute = true,
link_attributes = true,
startnum = true,
fancy_lists = true,
task_list = true,
Expand Down

0 comments on commit 4d739be

Please sign in to comment.