fix: preserve style edits and cross-surface inheritance

This commit is contained in:
2026-10-30 12:43:04 +08:00
parent 785d16a7e1
commit cc4f91899e
13 changed files with 332 additions and 131 deletions
+3 -4
View File
@@ -3,12 +3,11 @@
local prefix = 'MDHelperSource_'
local codes = {Strong='B', Emph='I', Strikeout='S', Link='L', Code='C'}
local function push(stack, code)
local copy, found = {}, false
local copy = {}
for _, value in ipairs(stack) do
copy[#copy + 1] = value
if value == code then found = true end
if value ~= code then copy[#copy + 1] = value end
end
if not found then copy[#copy + 1] = code end
copy[#copy + 1] = code
return copy
end
local function mark(items, stack)