Item summary. The item description follows. Information provided by the item comment can be formatted with both MediaWiki and Markdown syntax. The comments can generally span multiple lines.
By leaving empty comment lines, a new paragraph can be made in the documentation. This can be used to give longer explanations whitespace.
Item summary. The item description follows. Information provided by the item comment can be formatted with both MediaWiki and Markdown syntax. The comments can generally span multiple lines.
By leaving empty comment lines, a new paragraph can be made in the documentation. This can be used to give longer explanations whitespace.
Docbunto is an automatic documentation generator for Scribunto modules. The module is based on LuaDoc and LDoc. It produces documentation in the form of MediaWiki markup, using @tag-prefixed comments embedded in the source code of a Scribunto module. The taglet parser & doclet renderer Docbunto uses are also publicly exposed to other modules.
Docbunto code items are introduced by a block comment (--[[]]--), an inline comment with three hyphens (---), or an inline @tag comment. The module can use static code analysis to infer variable names, item privacy (local keyword), tables ({} constructor) and functions (function keyword). MediaWiki and Markdown formatting is supported.
Items are usually rendered in the order they are defined, if they are public items, or emulated classes extending the Lua primitives. There are many customisation options available to change Docbunto behaviour.
Docbunto is an automatic documentation generator for Scribunto modules. The module is based on LuaDoc and LDoc. It produces documentation in the form of MediaWiki markup, using @tag-prefixed comments embedded in the source code of a Scribunto module. The taglet parser & doclet renderer Docbunto uses are also publicly exposed to other modules.
Docbunto code items are introduced by a block comment (--[[]]--), an inline comment with three hyphens (---), or an inline @tag comment. The module can use static code analysis to infer variable names, item privacy (local keyword), tables ({} constructor) and functions (function keyword). MediaWiki and Markdown formatting is supported.
Items are usually rendered in the order they are defined, if they are public items, or emulated classes extending the Lua primitives. There are many customisation options available to change Docbunto behaviour.
Docbunto is an automatic documentation generator for Scribunto modules. The module is based on LuaDoc and LDoc. It produces documentation in the form of MediaWiki markup, using @tag-prefixed comments embedded in the source code of a Scribunto module. The taglet parser & doclet renderer Docbunto uses are also publicly exposed to other modules.
Docbunto code items are introduced by a block comment (--[[]]--), an inline comment with three hyphens (---), or an inline @tag comment. The module can use static code analysis to infer variable names, item privacy (local keyword), tables ({} constructor) and functions (function keyword). MediaWiki and Markdown formatting is supported.
Items are usually rendered in the order they are defined, if they are public items, or emulated classes extending the Lua primitives. There are many customisation options available to change Docbunto behaviour.
options.code Only document Docbunto code items - exclude article infobox and lede from rendered documentation. Permits article to be edited in VisualEditor. (boolean; optional)
options.colon Format tags with a : suffix and without the @ prefix. This bypasses the "doctag soup" some authors complain of. (boolean; optional)
options.card Include endmatter card in the output at the end of the documentation. (boolean; optional)
options.plain Disable Markdown formatting in documentation. (boolean; optional)
options.preface Preface text to insert between lede & item documentation, used to provide usage and code examples. (string; optional)
options.simple Limit documentation to descriptions only. Removes documentation of subitem tags such as @param and @field (see list). (boolean; optional)
options.sort Sort documentation items in alphabetical order. (boolean; optional)
options.strip Remove table index in documentation. (boolean; optional)
options.subst Don't preprocess code output before the documentation is outputted e.g. subst. (boolean; optional)
options.ulist Indent subitems as <ul> lists (LDoc/JSDoc behaviour). (boolean; optional)
options.verbose Show the code description of a package function when documenting function modules. (boolean; optional)
Docbunto is an automatic documentation generator for Scribunto modules. The module is based on LuaDoc and LDoc. It produces documentation in the form of MediaWiki markup, using @tag-prefixed comments embedded in the source code of a Scribunto module. The taglet parser & doclet renderer Docbunto uses are also publicly exposed to other modules.
Docbunto code items are introduced by a block comment (--[[]]--), an inline comment with three hyphens (---), or an inline @tag comment. The module can use static code analysis to infer variable names, item privacy (local keyword), tables ({} constructor) and functions (function keyword). MediaWiki and Markdown formatting is supported.
Items are usually rendered in the order they are defined, if they are public items, or emulated classes extending the Lua primitives. There are many customisation options available to change Docbunto behaviour.
options.code Only document Docbunto code items - exclude article infobox and lede from rendered documentation. Permits article to be edited in VisualEditor. (boolean; optional)
options.colon Format tags with a : suffix and without the @ prefix. This bypasses the "doctag soup" some authors complain of. (boolean; optional)
options.card Include endmatter card in the output at the end of the documentation. (boolean; optional)
options.plain Disable Markdown formatting in documentation. (boolean; optional)
options.preface Preface text to insert between lede & item documentation, used to provide usage and code examples. (string; optional)
options.simple Limit documentation to descriptions only. Removes documentation of subitem tags such as @param and @field (see list). (boolean; optional)
options.sort Sort documentation items in alphabetical order. (boolean; optional)
options.strip Remove table index in documentation. (boolean; optional)
options.subst Don't preprocess code output before the documentation is outputted e.g. subst. (boolean; optional)
options.ulist Indent subitems as <ul> lists (LDoc/JSDoc behaviour). (boolean; optional)
options.verbose Show the code description of a package function when documenting function modules. (boolean; optional)
A function with typed args. Note the the standard tparam aliases, and how the 'opt' and 'optchain' modifiers may also be used. If the Lua function has varargs, then you may document an indefinite number of extra arguments!
A function with typed args. Note the the standard tparam aliases, and how the 'opt' and 'optchain' modifiers may also be used. If the Lua function has varargs, then you may document an indefinite number of extra arguments!
This is bold text. This is also bold text. This is italic text. This is also italic text. This is bold italic text. Also this is rendered as bold & italic. This is strikethrough text. This is also strikethrough text. x2 renders as superscript text. It is rendered as x2.
Block formatting
Setext heading
This appears as a 1st list item.
This appears as a second list item.
Unordered list item number 1
Unordered list item number 2
Special formatting
Class is a type reference. Class is how it renders. [1] links to the official Lua reference manual. The Markdown syntax for this is: [lua.org https://www.lua.org/manual/5.1/index.html]. Class:method is wrapped in backticks to produce the code tag. Class:method is how it renders. renders like 102 using the math tag. is how it renders. The <chem>H_2O</chem> tag works too. It renders as H2O in the MediaWiki parser. The {{t}} module is usable for {{sandbox}}ing template usage.
Actual
Documentation
Package items
Text formatting
This is bold text. This is also bold text. This is italic text. This is also italic text. This is bold italic text. Also this is rendered as bold & italic. This is strikethrough text. This is also strikethrough text. x2 renders as superscript text. It is rendered as x2.
Block formatting
Setext heading
This appears as a 1st list item.
This appears as a second list item.
Unordered list item number 1
Unordered list item number 2
Special formatting
Class is a type reference. Class is how it renders. [2] links to the official Lua reference manual. The Markdown syntax for this is: [lua.org https://www.lua.org/manual/5.1/index.html]. Class:method is wrapped in backticks to produce the code tag. Class:method is how it renders. renders like 102 using the math tag. is how it renders. The <chem>H_2O</chem> tag works too. It renders as H2O in the MediaWiki parser. The {{t}} module is usable for {{sandbox}}ing template usage.
Docbunto is an automatic documentation generator for Scribunto modules. The module is based on LuaDoc and LDoc. It produces documentation in the form of MediaWiki markup, using @tag-prefixed comments embedded in the source code of a Scribunto module. The taglet parser & doclet renderer Docbunto uses are also publicly exposed to other modules.
Docbunto code items are introduced by a block comment (--[[]]--), an inline comment with three hyphens (---), or an inline @tag comment. The module can use static code analysis to infer variable names, item privacy (local keyword), tables ({} constructor) and functions (function keyword). MediaWiki and Markdown formatting is supported.
Items are usually rendered in the order they are defined, if they are public items, or emulated classes extending the Lua primitives. There are many customisation options available to change Docbunto behaviour.
options.code Only document Docbunto code items - exclude article infobox and lede from rendered documentation. Permits article to be edited in VisualEditor. (boolean; optional)
options.colon Format tags with a : suffix and without the @ prefix. This bypasses the "doctag soup" some authors complain of. (boolean; optional)
options.card Include endmatter card in the output at the end of the documentation. (boolean; optional)
options.plain Disable Markdown formatting in documentation. (boolean; optional)
options.preface Preface text to insert between lede & item documentation, used to provide usage and code examples. (string; optional)
options.simple Limit documentation to descriptions only. Removes documentation of subitem tags such as @param and @field (see list). (boolean; optional)
options.sort Sort documentation items in alphabetical order. (boolean; optional)
options.strip Remove table index in documentation. (boolean; optional)
options.subst Don't preprocess code output before the documentation is outputted e.g. subst. (boolean; optional)
options.ulist Indent subitems as <ul> lists (LDoc/JSDoc behaviour). (boolean; optional)
options.verbose Show the code description of a package function when documenting function modules. (boolean; optional)
Actual
Docbunto is an automatic documentation generator for Scribunto modules. The module is based on LuaDoc and LDoc. It produces documentation in the form of MediaWiki markup, using @tag-prefixed comments embedded in the source code of a Scribunto module. The taglet parser & doclet renderer Docbunto uses are also publicly exposed to other modules.
Docbunto code items are introduced by a block comment (--[[]]--), an inline comment with three hyphens (---), or an inline @tag comment. The module can use static code analysis to infer variable names, item privacy (local keyword), tables ({} constructor) and functions (function keyword). MediaWiki and Markdown formatting is supported.
Items are usually rendered in the order they are defined, if they are public items, or emulated classes extending the Lua primitives. There are many customisation options available to change Docbunto behaviour.
options.code Only document Docbunto code items - exclude article infobox and lede from rendered documentation. Permits article to be edited in VisualEditor. (boolean; optional)
options.colon Format tags with a : suffix and without the @ prefix. This bypasses the "doctag soup" some authors complain of. (boolean; optional)
options.card Include endmatter card in the output at the end of the documentation. (boolean; optional)
options.plain Disable Markdown formatting in documentation. (boolean; optional)
options.preface Preface text to insert between lede & item documentation, used to provide usage and code examples. (string; optional)
options.simple Limit documentation to descriptions only. Removes documentation of subitem tags such as @param and @field (see list). (boolean; optional)
options.sort Sort documentation items in alphabetical order. (boolean; optional)
options.strip Remove table index in documentation. (boolean; optional)
options.subst Don't preprocess code output before the documentation is outputted e.g. subst. (boolean; optional)
options.ulist Indent subitems as <ul> lists (LDoc/JSDoc behaviour). (boolean; optional)
options.verbose Show the code description of a package function when documenting function modules. (boolean; optional)
{{docbunto|Docbunto/testcases/Function|box = 0|preface =
== Usage ==
The Scribunto module can now be used with the following code:
p(function() print(2) end, 2)}}
Expected
Delay the execution of a function by t seconds.
Usage
The Scribunto module can now be used with the following code: