From e5597e7d723d1077d50c1e1e8819c6ad57d74df8 Mon Sep 17 00:00:00 2001 From: Applevangelist <72444570+Applevangelist@users.noreply.github.com> Date: Wed, 27 Oct 2021 08:42:59 +0200 Subject: [PATCH 01/11] Update templateengine.lua --- templateengine.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templateengine.lua b/templateengine.lua index 0f1bd00..b4e24e7 100644 --- a/templateengine.lua +++ b/templateengine.lua @@ -34,7 +34,7 @@ function M.applytemplate(elem, ident, templatetype,...) -- apply template local str, err = pltemplate.substitute(template, env) - + print(string.format("Template = $s",template)) --manage errors if not str then local templateerror = templatetype and string.format(' parsing "%s" template ', templatetype) or '' From 72c44be356abc87649f45d33eeb3f24003aaf554 Mon Sep 17 00:00:00 2001 From: Applevangelist <72444570+Applevangelist@users.noreply.github.com> Date: Wed, 27 Oct 2021 08:58:40 +0200 Subject: [PATCH 02/11] Update templateengine.lua --- templateengine.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templateengine.lua b/templateengine.lua index b4e24e7..b3aefea 100644 --- a/templateengine.lua +++ b/templateengine.lua @@ -34,7 +34,7 @@ function M.applytemplate(elem, ident, templatetype,...) -- apply template local str, err = pltemplate.substitute(template, env) - print(string.format("Template = $s",template)) + print(string.format("Template = %s",template)) --manage errors if not str then local templateerror = templatetype and string.format(' parsing "%s" template ', templatetype) or '' From 2b58f5a435415c43e5a6d24f5d8abdf423fa4c66 Mon Sep 17 00:00:00 2001 From: Applevangelist <72444570+Applevangelist@users.noreply.github.com> Date: Wed, 27 Oct 2021 10:46:26 +0200 Subject: [PATCH 03/11] Update docgenerator.lua --- docgenerator.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/docgenerator.lua b/docgenerator.lua index efa10ee..2bd323f 100644 --- a/docgenerator.lua +++ b/docgenerator.lua @@ -33,6 +33,7 @@ function M.generatedocforfiles(filenames, cssname,noheuristic) local wrongfiles = {} for _, filename in pairs( filenames ) do -- Load file content + print(filename) local file, error = io.open(filename, 'r') if not file then return nil, 'Unable to read "'..filename..'"\n'..err end local code = file:read('*all') From 5caccad1b7d34a66b2c805e37caf5f5616434b1c Mon Sep 17 00:00:00 2001 From: Applevangelist <72444570+Applevangelist@users.noreply.github.com> Date: Wed, 27 Oct 2021 10:47:44 +0200 Subject: [PATCH 04/11] Update templateengine.lua --- templateengine.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templateengine.lua b/templateengine.lua index b3aefea..9023cb2 100644 --- a/templateengine.lua +++ b/templateengine.lua @@ -34,7 +34,7 @@ function M.applytemplate(elem, ident, templatetype,...) -- apply template local str, err = pltemplate.substitute(template, env) - print(string.format("Template = %s",template)) + --print(string.format("Template = %s",template)) --manage errors if not str then local templateerror = templatetype and string.format(' parsing "%s" template ', templatetype) or '' From 6288f546cbf33ffb1949718f18f64f7fbe4467b4 Mon Sep 17 00:00:00 2001 From: Applevangelist <72444570+Applevangelist@users.noreply.github.com> Date: Wed, 27 Oct 2021 13:36:21 +0200 Subject: [PATCH 05/11] Update templateengine.lua --- templateengine.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templateengine.lua b/templateengine.lua index 9023cb2..0e83b8b 100644 --- a/templateengine.lua +++ b/templateengine.lua @@ -123,9 +123,11 @@ local defaultenv = { purelinkto = purelinkto, fulllinkto = fulllinkto, prettyname = function(s) return s end, - getelement = function(s) return nil end + getelement = function(s) return nil end, + _debug = true, } + -- this is the global env accessible in the templates -- env should be redefine by docgenerator user to add functions or redefine it. M.env = defaultenv From 533df9ec7531e1acfcdbf04070d275620f39a200 Mon Sep 17 00:00:00 2001 From: Applevangelist <72444570+Applevangelist@users.noreply.github.com> Date: Wed, 27 Oct 2021 14:34:48 +0200 Subject: [PATCH 06/11] Update templateengine.lua --- templateengine.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/templateengine.lua b/templateengine.lua index 0e83b8b..3e6af89 100644 --- a/templateengine.lua +++ b/templateengine.lua @@ -48,6 +48,7 @@ function M.getenv(elem, ident,...) local currentenv ={} for k,v in pairs(M.env) do currentenv[k] = v end if elem and elem.tag then + print(elem.tag) currentenv['_'..elem.tag]= elem end currentenv['i']= ident or 1 From d3f3c322d33d1e09c3a4b8d55fb5e4bdc5b88dfa Mon Sep 17 00:00:00 2001 From: Applevangelist <72444570+Applevangelist@users.noreply.github.com> Date: Wed, 27 Oct 2021 15:20:53 +0200 Subject: [PATCH 07/11] Update templateengine.lua --- templateengine.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templateengine.lua b/templateengine.lua index 3e6af89..c794815 100644 --- a/templateengine.lua +++ b/templateengine.lua @@ -48,7 +48,7 @@ function M.getenv(elem, ident,...) local currentenv ={} for k,v in pairs(M.env) do currentenv[k] = v end if elem and elem.tag then - print(elem.tag) + --print(elem.tag) currentenv['_'..elem.tag]= elem end currentenv['i']= ident or 1 From 3eac1e52f1eb60160cac5259cb194af29870f2da Mon Sep 17 00:00:00 2001 From: Applevangelist <72444570+Applevangelist@users.noreply.github.com> Date: Wed, 27 Oct 2021 15:22:00 +0200 Subject: [PATCH 08/11] Update recordtypedef.lua --- template/recordtypedef.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/recordtypedef.lua b/template/recordtypedef.lua index cdef337..478ecd3 100644 --- a/template/recordtypedef.lua +++ b/template/recordtypedef.lua @@ -79,7 +79,7 @@ return [[# # end # if typedef.supertype then # local modulename = typedef.supertype.modulename -# if modulename then +# if modulename and modules then # local file = modules[modulename] # if file then # local supertypedef = file.types[typedef.supertype.typename] From 7972255d1bf49cffc97b041b7ddb35c88bd9f0ed Mon Sep 17 00:00:00 2001 From: Thomas <72444570+Applevangelist@users.noreply.github.com> Date: Thu, 11 Dec 2025 16:53:04 +0100 Subject: [PATCH 09/11] Update apimodel.lua --- models/apimodel.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/apimodel.lua b/models/apimodel.lua index f661c85..2a367ad 100644 --- a/models/apimodel.lua +++ b/models/apimodel.lua @@ -188,7 +188,7 @@ function M._item(name) if not file then if self.parent and self.parent.tag == 'recordtypedef' then file = self.parent.parent - elseif self.parent.tag == 'file' then + elseif self.parent and self.parent.tag == 'file' then file = self.parent end end From 994691623c7e77cfb22e5c575c436d957e9775c1 Mon Sep 17 00:00:00 2001 From: Thomas <72444570+Applevangelist@users.noreply.github.com> Date: Thu, 11 Dec 2025 17:15:12 +0100 Subject: [PATCH 10/11] Update recordtypedef.lua --- template/index/recordtypedef.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/template/index/recordtypedef.lua b/template/index/recordtypedef.lua index 33796bd..79159ee 100644 --- a/template/index/recordtypedef.lua +++ b/template/index/recordtypedef.lua @@ -58,11 +58,13 @@ return [[# # local file = modules[modulename] # if file then # local itypedef = file.types[typedef.supertype.typename] -# itypedef.originalname = itypedef.name -# itypedef.name = name -# inherittype( itypedef, name, itypedef.originalname ) -# itypedef.name = itypedef.originalname -# itypedef.inheritedname = nil +# if itypedef then +# itypedef.originalname = itypedef.name +# itypedef.name = name +# inherittype( itypedef, name, itypedef.originalname ) +# itypedef.name = itypedef.originalname +# itypedef.inheritedname = nil +# end # end # end # end From 1bb5881a731841ddd540595c735ffbc2d747f31f Mon Sep 17 00:00:00 2001 From: Thomas <72444570+Applevangelist@users.noreply.github.com> Date: Thu, 11 Dec 2025 17:23:52 +0100 Subject: [PATCH 11/11] Update recordtypedef.lua --- template/recordtypedef.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/template/recordtypedef.lua b/template/recordtypedef.lua index 478ecd3..29c0067 100644 --- a/template/recordtypedef.lua +++ b/template/recordtypedef.lua @@ -83,13 +83,15 @@ return [[# # local file = modules[modulename] # if file then # local supertypedef = file.types[typedef.supertype.typename] -# supertypedef.originalname = supertypedef.name -# supertypedef.name = name -# supertypedef.originallink = fulllinkto( typedef.supertype ) -# inherittype( supertypedef, name, supertypedef.originallink ) -# supertypedef.name = supertypedef.originalname -# supertypedef.originalname = nil -# supertypedef.originallink = nil +# if supertypedef then +# supertypedef.originalname = supertypedef.name +# supertypedef.name = name +# supertypedef.originallink = fulllinkto( typedef.supertype ) +# inherittype( supertypedef, name, supertypedef.originallink ) +# supertypedef.name = supertypedef.originalname +# supertypedef.originalname = nil +# supertypedef.originallink = nil +# end # end # end # end