fix: retain conflicting saves and preserve list content in Word
This commit is contained in:
@@ -48,6 +48,12 @@ local function mark(items, stack)
|
||||
end
|
||||
local function list_paragraphs(list)
|
||||
for _, item in ipairs(list.content) do
|
||||
-- Word numbers paragraphs, not tables. Give a table-first item its own
|
||||
-- empty numbered paragraph; its following text remains a continuation.
|
||||
if item[1] and item[1].t == 'Table' then
|
||||
item:insert(1, pandoc.Div({pandoc.Para({pandoc.Str('\u{200b}')})},
|
||||
pandoc.Attr('', {}, {['custom-style']='MDHelperSourceTableMarker'})))
|
||||
end
|
||||
local target = list.t == 'OrderedList' and 'list_ordered' or 'list_bullet'
|
||||
local text = pandoc.utils.stringify(item[1] or {})
|
||||
if text:match('^%[[ xX]%]') or text:sub(1, #'☐') == '☐' or text:sub(1, #'☒') == '☒' or text:sub(1, #'☑') == '☑' then
|
||||
|
||||
Reference in New Issue
Block a user