issue #251 avoid potential clash between built-in and custom defined kinds like sections
This commit is contained in:
parent
3f57e431a2
commit
8de6c79493
|
@ -295,7 +295,9 @@ function File:finish()
|
||||||
end
|
end
|
||||||
item.display_name = display_name
|
item.display_name = display_name
|
||||||
this_mod.section = item
|
this_mod.section = item
|
||||||
this_mod.kinds:add_kind(display_name,display_name,nil,item)
|
-- the purpose of this little hack is to properly distinguish
|
||||||
|
-- between built-in kinds and any user-defined kins.
|
||||||
|
this_mod.kinds:add_kind(display_name,display_name..' ',nil,item)
|
||||||
this_mod.sections:append(item)
|
this_mod.sections:append(item)
|
||||||
this_mod.sections.by_name[lookup_name:gsub('%A','_')] = item
|
this_mod.sections.by_name[lookup_name:gsub('%A','_')] = item
|
||||||
end
|
end
|
||||||
|
|
|
@ -108,7 +108,6 @@ function KindMap:add (item,items,description)
|
||||||
local group = item[self.fieldname] -- which wd be item's type or section
|
local group = item[self.fieldname] -- which wd be item's type or section
|
||||||
local kname = self.klass.types_by_tag[group] -- the kind name
|
local kname = self.klass.types_by_tag[group] -- the kind name
|
||||||
if not self[kname] then
|
if not self[kname] then
|
||||||
-- print(kname,group,self.fieldname)
|
|
||||||
self[kname] = M.type_iterator (items,self.fieldname,group)
|
self[kname] = M.type_iterator (items,self.fieldname,group)
|
||||||
self.klass.descriptions[kname] = description
|
self.klass.descriptions[kname] = description
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue