Enable indentation / newlines in MathML writer
This commit is contained in:
parent
1046e096ed
commit
913b7150e1
@ -50,7 +50,7 @@ local function save_result(xml, display)
|
|||||||
local filename = token.scan_argument()
|
local filename = token.scan_argument()
|
||||||
if filename ~= '' then
|
if filename ~= '' then
|
||||||
assert(io.open(filename, 'w'))
|
assert(io.open(filename, 'w'))
|
||||||
:write(write_xml(make_root({[0] = 'mrow', xml}, display and 0 or 2)) .. '\n')
|
:write(write_xml(make_root({[0] = 'mrow', xml}, display and 0 or 2), true):sub(2) .. '\n')
|
||||||
:close()
|
:close()
|
||||||
end
|
end
|
||||||
if tex.count.tracingmathml > 1 then
|
if tex.count.tracingmathml > 1 then
|
||||||
|
@ -46,5 +46,5 @@ end
|
|||||||
|
|
||||||
return function(element, indent, version)
|
return function(element, indent, version)
|
||||||
return (version == '11' and '<?xml version="1.1"?>' or '') ..
|
return (version == '11' and '<?xml version="1.1"?>' or '') ..
|
||||||
write_elem(element, indent and '' or nil)
|
write_elem(element, indent and '\n' or nil)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user