diff --git a/contrib/luadoc/lua/luadoc/doclet/html/function.lp b/contrib/luadoc/lua/luadoc/doclet/html/function.lp
index aa0e25b14c..afc645b075 100644
--- a/contrib/luadoc/lua/luadoc/doclet/html/function.lp
+++ b/contrib/luadoc/lua/luadoc/doclet/html/function.lp
@@ -8,7 +8,7 @@ else
end
%>
-
<%=luadoc.doclet.html.include("menu.lp", { doc=doc, module_doc=module_doc })%>
+<% oop = ( module_doc.doc[1].cstyle == "instance" ) and true or false %>
-
Module <%=module_doc.name%>
+
<%=( oop and "Object Instance" or "Class" )%> <%=module_doc.name%>
<%=module_doc.description%>
<%if module_doc.author then%>
@@ -44,13 +45,13 @@
Release: <%=module_doc.release%>
<%end%>
-<%if #module_doc.functions > 0 then%>
+<%if #module_doc.functions > 0 then %>
Functions
<%for _, func_name in ipairs(module_doc.functions) do
local func_data = module_doc.functions[func_name]%>
- <%=func_data.private and "local " or ""%><%=func_name%> (<%=table.concat(module_doc.functions[func_name].param, ", ")%>) |
+ <%=func_data.private and "local " or ""%><%=(oop and func_name:gsub("%.",":") or func_name:gsub(".+%.",""))%> (<%=table.concat(module_doc.functions[func_name].param, ", ")%>) |
<%=module_doc.functions[func_name].summary%> |
<%end%>
@@ -79,7 +80,7 @@
Functions
<%for _, func_name in ipairs(module_doc.functions) do%>
-<%=luadoc.doclet.html.include("function.lp", { doc=doc, module_doc=module_doc, func=module_doc.functions[func_name] })%>
+<%=luadoc.doclet.html.include("function.lp", { doc=doc, module_doc=module_doc, func=module_doc.functions[func_name], oop=oop })%>
<%end%>
<%end%>
@@ -103,6 +104,6 @@

-
+