ignore element with status tex:ignore

This commit is contained in:
Ulrike Fischer 2025-02-05 23:45:11 +01:00
parent 37a9ce1b99
commit cca4a39d89
2 changed files with 4 additions and 2 deletions

View File

@ -116,7 +116,7 @@ local function write_elem(tree, stash)
end) end)
end end
for _, elem in ipairs(tree) do for _, elem in ipairs(tree) do
if type(elem) ~= 'string' then if type(elem) ~= 'string' and not elem['tex:ignore'] then
write_elem(elem) write_elem(elem)
end end
end end

View File

@ -48,7 +48,9 @@ local function write_elem(tree, indent)
out = out .. escape_text(elem) out = out .. escape_text(elem)
is_string = true is_string = true
else else
if not elem['tex:ignore'] then
out = out .. write_elem(elem, inner_indent) out = out .. write_elem(elem, inner_indent)
end
is_string = nil is_string = nil
end end
end end