Error Lua source code not found in Module:DEV/NULL
Actual
Error Lua source code not found in Module:DEV/NULL
Passing
{{docbunto|Codedoc}}
Expected
Error documentation markup for Docbunto not found in Module:Codedoc
Actual
Error documentation markup for Docbunto not found in Module:Codedoc
Passing
{{docbunto|Entrypoint}}
Expected
Entrypoint templating wrapper for Scribunto packages. The module generates an entrypoint function that can execute Scribunto package calls in the template context. This allows a package to support both direct and template invocations.
Template entrypoint function generated by this module.
Parameter: frame Scribunto frame in module context. (Frame)
Returns: Module output in template context. (string)
Notes
Parent frames are not available in Entrypoint's frame. This is because recursive (grandparent) frame access is impossible in legacy Scribunto due to empty-argument expansion cache limitations.
As Entrypoint enables template access rather than a new extension hook, it does not work with named numeric parameters such as 1= or 2=. This may result in unexpected behaviour such as Entrypoint and module errors.
Actual
Entrypoint templating wrapper for Scribunto packages. The module generates an entrypoint function that can execute Scribunto package calls in the template context. This allows a package to support both direct and template invocations.
Template entrypoint function generated by this module.
Parameter: frame Scribunto frame in module context. (Frame)
Returns: Module output in template context. (string)
Notes
Parent frames are not available in Entrypoint's frame. This is because recursive (grandparent) frame access is impossible in legacy Scribunto due to empty-argument expansion cache limitations.
As Entrypoint enables template access rather than a new extension hook, it does not work with named numeric parameters such as 1= or 2=. This may result in unexpected behaviour such as Entrypoint and module errors.
Passing
{{docbunto|Docbunto}}
Expected
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.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.ulist Indent subitems as <ul> lists (LDoc/JSDoc behaviour). (boolean; optional)
Token dictionary for Docbunto tags. Maps Docbunto tag names to tag tokens.
Multi-line tags use the 'M' token.
Multi-line preformatted tags use the 'ML' token.
Identifier tags use the 'ID' token.
Single-line tags use the 'S' token.
Flags use the 'N' token.
Type tags use the 'T' token.
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.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.ulist Indent subitems as <ul> lists (LDoc/JSDoc behaviour). (boolean; optional)
Entrypoint templating wrapper for Scribunto packages. The module generates an entrypoint function that can execute Scribunto package calls in the template context. This allows a package to support both direct and template invocations.
Template entrypoint function generated by this module.
Parameter: frame Scribunto frame in module context. (Frame)
Returns: Module output in template context. (string)
Notes
Parent frames are not available in Entrypoint's frame. This is because recursive (grandparent) frame access is impossible in legacy Scribunto due to empty-argument expansion cache limitations.
As Entrypoint enables template access rather than a new extension hook, it does not work with named numeric parameters such as 1= or 2=. This may result in unexpected behaviour such as Entrypoint and module errors.
Entrypoint templating wrapper for Scribunto packages. The module generates an entrypoint function that can execute Scribunto package calls in the template context. This allows a package to support both direct and template invocations.
Template entrypoint function generated by this module.
Parameter: frame Scribunto frame in module context. (Frame)
Returns: Module output in template context. (string)
Notes
Parent frames are not available in Entrypoint's frame. This is because recursive (grandparent) frame access is impossible in legacy Scribunto due to empty-argument expansion cache limitations.
As Entrypoint enables template access rather than a new extension hook, it does not work with named numeric parameters such as 1= or 2=. This may result in unexpected behaviour such as Entrypoint and module errors.
Entrypoint templating wrapper for Scribunto packages. The module generates an entrypoint function that can execute Scribunto package calls in the template context. This allows a package to support both direct and template invocations.
Parent frames are not available in Entrypoint's frame. This is because recursive (grandparent) frame access is impossible in legacy Scribunto due to empty-argument expansion cache limitations.
As Entrypoint enables template access rather than a new extension hook, it does not work with named numeric parameters such as 1= or 2=. This may result in unexpected behaviour such as Entrypoint and module errors.
Entrypoint templating wrapper for Scribunto packages. The module generates an entrypoint function that can execute Scribunto package calls in the template context. This allows a package to support both direct and template invocations.
Parent frames are not available in Entrypoint's frame. This is because recursive (grandparent) frame access is impossible in legacy Scribunto due to empty-argument expansion cache limitations.
As Entrypoint enables template access rather than a new extension hook, it does not work with named numeric parameters such as 1= or 2=. This may result in unexpected behaviour such as Entrypoint and module errors.
Passing
{{docbunto|Unindent|boilerplate = 1}}
Expected
Unindent resets the indentation level of mulitline strings. It is useful for multiline strings inside functions and large tables. This module serves as a utility function for string parsing, Testharness test suites, I18n datastores.
Lua supports multiline strings in the format [[\n...\n]]. In general, Lua does not outdent indented multiline strings out of the box. Though Lua supports variable indentation in multiline strings, custom logic is necessary to reset the string's indentation. This module adopts a flexible approach based on string scanning.
Unlike Penlight's pl.text.dedent behaviour where every line has the indentation of the first line removed, the line prefixed with the least non-tab whitespace is reset to zero indentation. Thus, the opening line of the string may retain some indentation if there are lines of less indentation terminating the string.
Unindent resets the indentation level of mulitline strings. It is useful for multiline strings inside functions and large tables. This module serves as a utility function for string parsing, Testharness test suites, I18n datastores.
Lua supports multiline strings in the format [[\n...\n]]. In general, Lua does not outdent indented multiline strings out of the box. Though Lua supports variable indentation in multiline strings, custom logic is necessary to reset the string's indentation. This module adopts a flexible approach based on string scanning.
Unlike Penlight's pl.text.dedent behaviour where every line has the indentation of the first line removed, the line prefixed with the least non-tab whitespace is reset to zero indentation. Thus, the opening line of the string may retain some indentation if there are lines of less indentation terminating the string.
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!
{{docbunto|Entrypoint|code = 1|preface =
== Usage ==
The Scribunto module can now be used with the following syntax:
{{t|string|function|one|two|...}}}}
Expected
Usage
The Scribunto module can now be used with the following syntax:
Entrypoint templating wrapper for Scribunto packages. The module generates an entrypoint function that can execute Scribunto package calls in the template context. This allows a package to support both direct and template invocations.
Template entrypoint function generated by this module.
Parameter: frame Scribunto frame in module context. (Frame)
Returns: Module output in template context. (string)
Notes
Parent frames are not available in Entrypoint's frame. This is because recursive (grandparent) frame access is impossible in legacy Scribunto due to empty-argument expansion cache limitations.
As Entrypoint enables template access rather than a new extension hook, it does not work with named numeric parameters such as 1= or 2=. This may result in unexpected behaviour such as Entrypoint and module errors.
Actual
Usage
The Scribunto module can now be used with the following syntax:
Entrypoint templating wrapper for Scribunto packages. The module generates an entrypoint function that can execute Scribunto package calls in the template context. This allows a package to support both direct and template invocations.
Template entrypoint function generated by this module.
Parameter: frame Scribunto frame in module context. (Frame)
Returns: Module output in template context. (string)
Notes
Parent frames are not available in Entrypoint's frame. This is because recursive (grandparent) frame access is impossible in legacy Scribunto due to empty-argument expansion cache limitations.
As Entrypoint enables template access rather than a new extension hook, it does not work with named numeric parameters such as 1= or 2=. This may result in unexpected behaviour such as Entrypoint and module errors.