# local no_spaces = ldoc.no_spaces # local use_li = ldoc.use_li # local escape = ldoc.escape # local display_name = ldoc.display_name # local iter = ldoc.modules.iter # local function M(txt,item) return ldoc.markup(txt,item,ldoc.plain) end # local nowrap = ldoc.wrap and '' or 'nowrap' # local html_root = (not ldoc.single and module) and "../" or "./" # local show_return = not ldoc.no_return_or_parms # local show_parms = show_return # local need_module_nav = false # if module then # for kind, items in module.kinds() do # for item in items() do # need_module_nav = true # break # end # end # end $(escape(ldoc.title)) # if ldoc.custom_css then -- add custom CSS file if configured. # end

$(ldoc.project)

# -------- contents of project ---------- # local this_mod = module and module.name # --------- contents of module ------------- # if need_module_nav then # local one_column_nav_display = (ldoc.one) and "" or "hidden-md-up" # end -- if need_module_nav
# local one_column_nav_display = ldoc.one and "hidden" or "hidden-sm-down"
# if ldoc.body then -- verbatim HTML as contents; 'non-code' entries $(ldoc.body) # elseif module then -- module documentation

$(ldoc.module_typename(module)) $(module.mod_name)

$(M(module.summary,module))

$(M(module.description,module))

# if module.info or module.tags.include or module.see then # local one_column_nav_display = ldoc.one and "" or "hidden-md-up"
# local sub_col_width = 12 / ( # (module.info and 1 or 0) + # (module.tags.include and 1 or 0) + # (module.see and 1 or 0) # ) # sub_col_width = sub_col_width == 12 and "12" or sub_col_width == 6 and "6" or "4" # if module.info then
Info:
    # for tag, value in module.info:iter() do # local icon_name = nil # if tag == "Author" then icon_name = "mdi-pencil" end
  • # if icon_name then # else $(tag) # end $(M(value, module))
  • # end -- for tags
# end -- if module.info # if module.tags.include then
References:

$(M(ldoc.include_file(module.tags.include)))

# end # if module.see then
See also:
# end -- if module.see
# end # if module.usage then
Usage:
    # for usage in iter(module.usage) do
  • $(ldoc.escape(usage))
  • # end
# end
# if need_module_nav then
# for kind, items in module.kinds() do # local kitem = module.kinds:get_item(kind) # local has_sect_description = M(module.kinds:get_section_description(kind),nil) ~= "" # local has_description = kitem and ldoc.descript(kitem) ~= "" # local has_usage = kitem and kitem.usage and kitem.usage ~= ""

$(kind)

# if has_sect_description or has_description or has_usage then
$(M(module.kinds:get_section_description(kind),nil)) # if has_description then

$(M(ldoc.descript(kitem),kitem))

# end # if has_usage then

Usage:

$(ldoc.prettify(kitem.usage))

# end
# end -- if has_...
    # for item in items() do
  • $(display_name(item))

    # if ldoc.prettify_files and ldoc.is_file_prettified[item.module.file.filename] then line $(escape(item.lineno)) # end

    $(M(ldoc.descript(item),item))

    # if ldoc.custom_tags then # for custom in iter(ldoc.custom_tags) do # local tag = item.tags[custom[1]] # if tag and not custom.hidden then $(custom.title or custom[1]):
      # for value in iter(tag) do
    • $(custom.format and custom.format(value) or M(value))
    • # end -- for
    # end -- if tag # end -- iter custom_tags # end -- if ldoc.custom_tags # if show_parms and item.params and #item.params > 0 then # local subnames = module.kinds:type_of(item).subnames # if subnames then $(subnames): # end
      # for parm in iter(item.params) do # local param,sublist = item:subparam(parm) # if sublist then
    • $(sublist) $(M(item.params.map[sublist],item))
        # end -- if sublist # for p in iter(param) do # local name = item:display_name_of(p) # local tp = ldoc.typename(item:type_of_param(p)) # local def = item:default_of_param(p)
      • # if tp ~= '' then $(tp) # end $(escape(name))
        $(M(item.params.map[p],item)) # if def == true then (optional) # elseif def then (default $(escape(def))) # end # if item:readonly(p) then readonly # end
      • # end -- for iter(param) # if sublist then
    • # end -- if sublist # end -- for param in iter params
    # end -- if show_params and... # if show_return and item.retgroups then # local groups = item.retgroups Returns: # for i, group in ldoc.ipairs(groups) do # local li,il = use_li(group)
      # for r in group:iter() do # local type, ctypes = item:return_type(r) # local rt = ldoc.typename(type)
    • # if rt ~= '' then $(rt) # end $(M(r.text,item)) # if ctypes then
        # for c in ctypes:iter() do
      • $(escape(c.name)) $(ldoc.typename(c.type)) $((M(c.comment,item))
      • # end -- for c in ctypes
      # end -- if ctypes
    • # end -- for r in group
    # if i < #groups then Or # end # end -- for i, group in groups # end -- if show_return and item.retgroups # if show_return and item.raise then Raises: $(M(item.raise,item)) # end # if item.see then See also: # end -- if see # if item.usage then Usage:
      # for usage in iter(item.usage) do
    • $(ldoc.prettify(usage))
    • # end -- for
    # end -- if usage
  • # end -- for items
# end -- for kind in kinds
# end -- if need_module_nav # end -- if not ldoc.body and module