User:Ganaram inukshuk/Provisional style guide for Lua: Difference between revisions
No edit summary |
No edit summary |
||
| Line 80: | Line 80: | ||
=== Mediawiki table formatting === | === Mediawiki table formatting === | ||
Wikitables should be written with one line per cell instead of one line per row. This is for ease-of-reading when debugging the output of a module-generated table. Add a space between pipes/exclamation points and table entries to avoid accidentally adding new rows, such as when inputting negative numbers. | Wikitables should be written with one line per cell instead of one line per row. This is for ease-of-reading when debugging the output of a module-generated table. Add a space between pipes/exclamation points and table entries to avoid accidentally adding new rows, such as when inputting negative numbers. Mediawiki tables generated using Lua code must follow this convention. | ||
'''Preferred''' | '''Preferred'''<syntaxhighlight lang="wikitext"><nowiki>{| class="wikitable" | ||
< | |||
|+ Caption text | |+ Caption text | ||
|- | |- | ||
| Line 98: | Line 96: | ||
| ee | | ee | ||
| ff | | ff | ||
|}</nowiki> | |}</nowiki></syntaxhighlight>'''Avoid'''<syntaxhighlight lang="wikitext"> | ||
<nowiki>{| class="wikitable" | |||
'''Avoid''' | |||
< | |||
|+ Caption text | |+ Caption text | ||
|- | |- | ||
| Line 112: | Line 106: | ||
| dd || ee || ff | | dd || ee || ff | ||
|}</nowiki> | |}</nowiki> | ||
</syntaxhighlight> | |||
== Templates and modules == | == Templates and modules == | ||