summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/node-ser.lmt
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2022-08-25 17:57:42 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2022-08-25 17:57:42 +0200
commita389a16197fed7803672a8e16fd31d634725d49a (patch)
treeff79e88e68f213d0a226f57caa23809e720d3c5c /tex/context/base/mkxl/node-ser.lmt
parent178de9556e3cb519672f9b54db7b5b29eec43c69 (diff)
downloadcontext-a389a16197fed7803672a8e16fd31d634725d49a.tar.gz
2022-08-25 17:40:00
Diffstat (limited to 'tex/context/base/mkxl/node-ser.lmt')
-rw-r--r--tex/context/base/mkxl/node-ser.lmt8
1 files changed, 7 insertions, 1 deletions
diff --git a/tex/context/base/mkxl/node-ser.lmt b/tex/context/base/mkxl/node-ser.lmt
index 089009260..e45d7f249 100644
--- a/tex/context/base/mkxl/node-ser.lmt
+++ b/tex/context/base/mkxl/node-ser.lmt
@@ -6,6 +6,8 @@ if not modules then modules = { } end modules ['node-ser'] = {
license = "see context related readme files"
}
+-- needs to be updated (mayeb fetch field types)
+
local type, tostring = type, tostring
local concat, tohash, sortedkeys, sortedhash, printtable, serialize = table.concat, table.tohash, table.sortedkeys, table.sortedhash, table.print, table.serialize
local formatters, format, rep = string.formatters, string.format, string.rep
@@ -64,6 +66,8 @@ end)
nodes.fieldtypes = fieldtypes
+-- todo: subtype zero too
+
local function astable(n)
n = tonode(n)
if n then
@@ -75,7 +79,9 @@ local function astable(n)
for field, fieldtype in sortedhash(fields) do -- no need to sort
local value = n[field]
if value then
- if canbeignored[field] then
+ if field == "subtype" then
+ -- we always show them now
+ elseif canbeignored[field] then
value = nil
elseif canbezero[fieldtype] and value == 0 then
value = nil