Codebase list lua-ldoc / 8de6c79
issue #251 avoid potential clash between built-in and custom defined kinds like sections Steve Donovan 7 years ago
2 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
294294 end
295295 item.display_name = display_name
296296 this_mod.section = item
297 this_mod.kinds:add_kind(display_name,display_name,nil,item)
297 -- the purpose of this little hack is to properly distinguish
298 -- between built-in kinds and any user-defined kins.
299 this_mod.kinds:add_kind(display_name,display_name..' ',nil,item)
298300 this_mod.sections:append(item)
299301 this_mod.sections.by_name[lookup_name:gsub('%A','_')] = item
300302 end
107107 local group = item[self.fieldname] -- which wd be item's type or section
108108 local kname = self.klass.types_by_tag[group] -- the kind name
109109 if not self[kname] then
110 -- print(kname,group,self.fieldname)
111110 self[kname] = M.type_iterator (items,self.fieldname,group)
112111 self.klass.descriptions[kname] = description
113112 end