Help:Lua debugging: Difference between revisions

Content deleted Content added
new key for Category:Module help: "Debugging" using HotCat
 
(3 intermediate revisions by 2 users not shown)
Line 85:
 
=== Small caveat: The case of the wrong case ===
Wikipedia has a small perversion regarding page name casing: it will convert the first character of a page name to uppercase, regardless of the way it was entered. To compensate, it also converts the first letter of a template (when transcluded) and module (when invoked) to uppercase. however, this does not extend to the modules stored in User: namespace viewed through the special [[Template sandbox]], because in the sandbox "the first letter" is not the first letter any more. Here is an actual example: for real modules, let's say [[Module:String]], mediawiki software will allow you to use <nowiki>{{#invoke:mlx|String|replace|Hara I am|a|e}}</nowiki> to return "Here I em" (try it). It will also allow you to use <nowiki>{{#invoke:mlx|string|replace|Hara I am|a|e}}</nowiki> to get the same result:
{|class="wikitable"
|-
! wikitext !! result
|-
|<nowiki>{{#invoke:mlx|String | replace | Hara I am |a|e}}</nowiki>||{{#invoke:String | replace | Hara I am |a|e}}
|-
|<nowiki>{{#invoke:mlx|string | replace | Hara I am |a|e}}</nowiki>||{{#invoke:string | replace | Hara I am |a|e}}
|}
 
Line 134:
[[Category:Wikipedia how-to]]
[[Category:Wikipedia text help]]
[[Category:WikipediaModule moduleshelp|Debugging]]