https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3AInfobox_rune%2Fsandbox Module:Infobox rune/sandbox - Revision history 2025-05-30T05:24:24Z Revision history for this page on the wiki MediaWiki 1.45.0-wmf.3 https://en.wikipedia.org/w/index.php?title=Module:Infobox_rune/sandbox&diff=1117368205&oldid=prev WOSlinker: use require('strict') instead of require('Module:No globals') 2022-10-21T10:07:18Z <p>use require(&#039;strict&#039;) instead of require(&#039;Module:No globals&#039;)</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 10:07, 21 October 2022</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 2:</td> <td colspan="2" class="diff-lineno">Line 2:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- This module implements {{Infobox rune}}</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- This module implements {{Infobox rune}}</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>--</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>--</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>require('<del style="font-weight: bold; text-decoration: none;">Module:No globals</del>')</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>require('<ins style="font-weight: bold; text-decoration: none;">strict</ins>')</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local p = {}</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local p = {}</div></td> </tr> </table> WOSlinker https://en.wikipedia.org/w/index.php?title=Module:Infobox_rune/sandbox&diff=815288658&oldid=prev Frietjes at 23:29, 13 December 2017 2017-12-13T23:29:36Z <p></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 23:29, 13 December 2017</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 13:</td> <td colspan="2" class="diff-lineno">Line 13:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> row:tag('td')</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> row:tag('td')</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :css('font-size', fs)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :css('font-size', fs)</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_6_0_lhs">&#x26AB;</a></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_1_0_rhs"></a> :css('<ins style="font-weight: bold; text-decoration: none;">padding</ins>', <ins style="font-weight: bold; text-decoration: none;">'1px'</ins>)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :attr('colspan', colspan)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :attr('colspan', colspan)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :wikitext(entries)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :wikitext(entries)</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Line 19:</td> <td colspan="2" class="diff-lineno">Line 20:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if subcols[k] &gt; 0 then</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if subcols[k] &gt; 0 then</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if entries[k] and type(entries[k]) == 'string' then</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if entries[k] and type(entries[k]) == 'string' then</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> if entries[k] ~= '&lt;same&gt;' then</div></td> </tr> <tr> <td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_10_5_rhs">&#x26AB;</a></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_4_0_lhs"></a> row:tag('td')</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_8_0_lhs">&#x26AB;</a></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_5_0_rhs"></a> <ins style="font-weight: bold; text-decoration: none;">local </ins>colspan <ins style="font-weight: bold; text-decoration: none;">=</ins> subcols[k]</div></td> </tr> <tr> <td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_1_0_rhs">&#x26AB;</a></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_6_0_lhs"></a><del style="font-weight: bold; text-decoration: none;"> </del> :css('<del style="font-weight: bold; text-decoration: none;">font-size</del>', <del style="font-weight: bold; text-decoration: none;">fs</del>)</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> for j=(k+1),3 do</div></td> </tr> <tr> <td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_5_0_rhs">&#x26AB;</a></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_8_0_lhs"></a> <del style="font-weight: bold; text-decoration: none;">:attr('</del>colspan<del style="font-weight: bold; text-decoration: none;">',</del> <del style="font-weight: bold; text-decoration: none;">(subcols[k] &gt; 1) and</del> subcols[k]<del style="font-weight: bold; text-decoration: none;"> or nil)</del></div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del style="font-weight: bold; text-decoration: none;">:wikitext(</del>entries[<del style="font-weight: bold; text-decoration: none;">k</del>]<del style="font-weight: bold; text-decoration: none;">)</del></div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> <ins style="font-weight: bold; text-decoration: none;"> if </ins>entries[<ins style="font-weight: bold; text-decoration: none;">j</ins>]<ins style="font-weight: bold; text-decoration: none;"> and entries[j] == '&lt;same&gt;' then</ins></div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> colspan = colspan + subcols[j]</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> else</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> break</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_4_0_lhs">&#x26AB;</a></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_10_5_rhs"></a><ins style="font-weight: bold; text-decoration: none;"> </ins> row:tag('td')</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> :css('font-size', fs)</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> :css('padding', '1px')</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> :attr('colspan', (colspan &gt; 1) and colspan or nil)</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> :wikitext(entries[k])</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> elseif entries[k] then</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> elseif entries[k] then</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> for j=1,subcols[k] do</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> for j=1,subcols[k] do</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Line 28:</td> <td colspan="2" class="diff-lineno">Line 40:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> row:tag('td')</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> row:tag('td')</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :css('font-size', fs)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :css('font-size', fs)</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> :css('padding', '1px')</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :wikitext(entries[k][j])</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :wikitext(entries[k][j])</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> else</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> else</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Line 165:</td> <td colspan="2" class="diff-lineno">Line 178:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :css('clear', (args.float == 'none' and 'both') or args.float or 'right')</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :css('clear', (args.float == 'none' and 'both') or args.float or 'right')</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :css('width', args.width or 'auto')</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :css('width', args.width or 'auto')</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> :css('margin', args.float == 'left' and '0 1.0em <del style="font-weight: bold; text-decoration: none;">1</del>.<del style="font-weight: bold; text-decoration: none;">0em</del> 0' or '0 0 <del style="font-weight: bold; text-decoration: none;">1</del>.<del style="font-weight: bold; text-decoration: none;">0em</del> 1.0em')</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> :css('margin', args.float == 'left' and '0<ins style="font-weight: bold; text-decoration: none;">.5em</ins> 1.0em <ins style="font-weight: bold; text-decoration: none;">0</ins>.<ins style="font-weight: bold; text-decoration: none;">5em</ins> 0' or '0<ins style="font-weight: bold; text-decoration: none;">.5em</ins> 0 <ins style="font-weight: bold; text-decoration: none;">0</ins>.<ins style="font-weight: bold; text-decoration: none;">5em</ins> 1.0em')</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :css('font-size', '88%')</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :css('font-size', '88%')</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> :css('text-align', 'center')</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local rowspan = 1 + (entries['name'] and 1 or 0) + (entries['meaning'] and 1 or 0)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local rowspan = 1 + (entries['name'] and 1 or 0) + (entries['meaning'] and 1 or 0)</div></td> </tr> </table> Frietjes https://en.wikipedia.org/w/index.php?title=Module:Infobox_rune/sandbox&diff=815287515&oldid=prev Frietjes at 23:19, 13 December 2017 2017-12-13T23:19:18Z <p></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 23:19, 13 December 2017</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 108:</td> <td colspan="2" class="diff-lineno">Line 108:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> entries[pre][num] = v</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> entries[pre][num] = v</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> for i = (num+1),num2 do</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> for i = (num+1),num2 do</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> entries[pre][<del style="font-weight: bold; text-decoration: none;">num2</del>] = '&lt;same&gt;'</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> entries[pre][<ins style="font-weight: bold; text-decoration: none;">i</ins>] = '&lt;same&gt;'</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> else</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> else</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Line 114:</td> <td colspan="2" class="diff-lineno">Line 114:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> entries[pre][num] = v</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> entries[pre][num] = v</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> for i = (num+1),num2 do</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> for i = (num+1),num2 do</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> entries[pre][<del style="font-weight: bold; text-decoration: none;">num2</del>] = '&lt;same&gt;'</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> entries[pre][<ins style="font-weight: bold; text-decoration: none;">i</ins>] = '&lt;same&gt;'</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> </table> Frietjes https://en.wikipedia.org/w/index.php?title=Module:Infobox_rune/sandbox&diff=815287355&oldid=prev Frietjes at 23:17, 13 December 2017 2017-12-13T23:17:49Z <p></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 23:17, 13 December 2017</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 19:</td> <td colspan="2" class="diff-lineno">Line 19:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if subcols[k] &gt; 0 then</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if subcols[k] &gt; 0 then</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if entries[k] and type(entries[k]) == 'string' then</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if entries[k] and type(entries[k]) == 'string' then</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local colspan = subcols[k]</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> for j=(k+1),3 do</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> if entries[j] and entries[j] == '&lt;same&gt;' then</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> colspan = colspan + subcols[j]</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> else</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> break</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> row:tag('td')</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> row:tag('td')</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :css('font-size', fs)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :css('font-size', fs)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> :attr('colspan', (<del style="font-weight: bold; text-decoration: none;">colspan</del> &gt; 1) and <del style="font-weight: bold; text-decoration: none;">colspan</del> or nil)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> :attr('colspan', (<ins style="font-weight: bold; text-decoration: none;">subcols[k]</ins> &gt; 1) and <ins style="font-weight: bold; text-decoration: none;">subcols[k]</ins> or nil)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :wikitext(entries[k])</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :wikitext(entries[k])</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> elseif entries[k] then</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> elseif entries[k] then</div></td> </tr> </table> Frietjes https://en.wikipedia.org/w/index.php?title=Module:Infobox_rune/sandbox&diff=815286889&oldid=prev Frietjes: ←Created page with '-- -- This module implements {{Infobox rune}} -- require('Module:No globals') local p = {} local getArgs = require('Module:Arguments').getArgs local function...' 2017-12-13T23:13:32Z <p><a href="/wiki/Wikipedia:AES" class="mw-redirect" title="Wikipedia:AES">←</a>Created page with &#039;-- -- This module implements {{Infobox rune}} -- require(&#039;Module:No globals&#039;) local p = {} local getArgs = require(&#039;Module:Arguments&#039;).getArgs local function...&#039;</p> <p><b>New page</b></p><div>--<br /> -- This module implements {{Infobox rune}}<br /> --<br /> require(&#039;Module:No globals&#039;)<br /> <br /> local p = {}<br /> <br /> local getArgs = require(&#039;Module:Arguments&#039;).getArgs<br /> <br /> local function addCells(row, entries, subcols, fs)<br /> if type(entries) == &#039;string&#039; then<br /> local colspan = subcols[1] + subcols[2] + subcols[3]<br /> row:tag(&#039;td&#039;)<br /> :css(&#039;font-size&#039;, fs)<br /> :attr(&#039;colspan&#039;, colspan)<br /> :wikitext(entries)<br /> else<br /> for k=1,3 do<br /> if subcols[k] &gt; 0 then<br /> if entries[k] and type(entries[k]) == &#039;string&#039; then<br /> local colspan = subcols[k]<br /> for j=(k+1),3 do<br /> if entries[j] and entries[j] == &#039;&lt;same&gt;&#039; then<br /> colspan = colspan + subcols[j]<br /> else<br /> break<br /> end<br /> end<br /> row:tag(&#039;td&#039;)<br /> :css(&#039;font-size&#039;, fs)<br /> :attr(&#039;colspan&#039;, (colspan &gt; 1) and colspan or nil)<br /> :wikitext(entries[k])<br /> elseif entries[k] then<br /> for j=1,subcols[k] do<br /> if entries[k][j] then<br /> row:tag(&#039;td&#039;)<br /> :css(&#039;font-size&#039;, fs)<br /> :wikitext(entries[k][j])<br /> else<br /> row:tag(&#039;td&#039;)<br /> end<br /> end<br /> else<br /> for j=1,subcols[k] do<br /> row:tag(&#039;td&#039;)<br /> end<br /> end<br /> end<br /> end<br /> end<br /> end<br /> <br /> function p.infobox(frame)<br /> local args = getArgs(frame)<br /> <br /> local langlinks = {<br /> pg = &#039;[[Proto-Germanic language|Proto-Germanic]]&#039;,<br /> oe = &#039;[[Old English]]&#039;,<br /> on = &#039;[[Old Norse]]&#039;<br /> }<br /> <br /> local shapelinks = {<br /> pg = &#039;[[Elder Futhark]]&#039;,<br /> oe = &#039;[[Anglo-Saxon runes|Futhorc]]&#039;,<br /> on = &#039;[[Younger Futhark]]&#039;<br /> }<br /> <br /> local let2num = {<br /> a = &#039;1&#039;,<br /> b = &#039;2&#039;,<br /> c = &#039;3&#039;,<br /> d = &#039;4&#039;,<br /> e = &#039;5&#039;<br /> }<br /> <br /> -- fill in the entries<br /> local entrynames = {&#039;lang&#039;, &#039;name&#039;, &#039;meaning&#039;, &#039;shape&#039;, &#039;unicode hex&#039;, <br /> &#039;transliteration&#039;, &#039;transcription&#039;, &#039;IPA&#039;, &#039;position&#039;}<br /> local entries = {}<br /> for i = 1, #entrynames do<br /> entries[entrynames[i]] = nil<br /> end<br /> <br /> for k, v in pairs(args) do<br /> k = &#039;&#039; .. k<br /> local pre, num, num2, let = nil, nil, nil, nil<br /> for i = 1, #entrynames do<br /> pre, num, let = k:match(&#039;^(&#039; .. entrynames[i] .. &#039;)([1-3])([a-e]?)$&#039;)<br /> num2 = nil<br /> if pre then break end<br /> pre, num, num2 = k:match(&#039;^(&#039; .. entrynames[i] .. &#039;)([1-3])([1-3]?)$&#039;)<br /> let = nil<br /> if pre then break end<br /> end<br /> if pre == &#039;unicode hex&#039; then <br /> v = &#039;&amp;#x&#039; .. v .. &#039;; &#039; .. &#039;&lt;div style=&quot;font-size: 30%&quot;&gt;U+&#039; .. v .. &#039;&lt;/div&gt;&#039;<br /> end<br /> if num and num ~= &#039;&#039; then<br /> num = tonumber(num)<br /> if let and let ~= &#039;&#039; then<br /> if entries[pre] and type(entries[pre]) == &#039;table&#039; then<br /> if entries[pre][num] and type(entries[pre][num]) == &#039;table&#039; then<br /> entries[pre][num][tonumber(let2num[let])] = v<br /> else<br /> entries[pre][num] = {nil, nil, nil, nil, nil}<br /> entries[pre][num][tonumber(let2num[let])] = v<br /> end<br /> else<br /> entries[pre] = {nil, nil, nil}<br /> entries[pre][num] = {nil, nil, nil, nil, nil}<br /> entries[pre][num][tonumber(let2num[let])] = v<br /> end<br /> elseif num2 and num2 ~= &#039;&#039; then<br /> num2 = tonumber(num2)<br /> if entries[pre] and type(entries[pre]) == &#039;table&#039; then<br /> entries[pre][num] = v<br /> for i = (num+1),num2 do<br /> entries[pre][num2] = &#039;&lt;same&gt;&#039;<br /> end<br /> else<br /> entries[pre] = {nil, nil, nil}<br /> entries[pre][num] = v<br /> for i = (num+1),num2 do<br /> entries[pre][num2] = &#039;&lt;same&gt;&#039;<br /> end<br /> end<br /> else<br /> if entries[pre] and type(entries[pre]) == &#039;table&#039; then<br /> entries[pre][num] = v<br /> else<br /> entries[pre] = {nil, nil, nil}<br /> entries[pre][num] = v<br /> end<br /> end<br /> elseif pre then<br /> entries[pre] = v<br /> end<br /> end<br /> <br /> local subcols = {0, 0, 0}<br /> <br /> -- determine the number of subcolumns per column<br /> for i = 1, #entrynames do<br /> local e = entries[entrynames[i]]<br /> if e then<br /> if type(e) == &#039;table&#039; then<br /> for j = 1,3 do<br /> if e[j] and type(e[j]) == &#039;table&#039; then<br /> local n = #(e[j])<br /> if n &gt; subcols[j] then<br /> subcols[j] = n<br /> end<br /> elseif e[j] then<br /> if 1 &gt; subcols[j] then<br /> subcols[j] = 1<br /> end<br /> end<br /> end<br /> end<br /> end<br /> end<br /> <br /> local lets = {&#039;a&#039;, &#039;b&#039;, &#039;c&#039;, &#039;d&#039;, &#039;e&#039;}<br /> <br /> -- build the table<br /> local root = mw.html.create()<br /> <br /> root = root<br /> :tag(&#039;table&#039;)<br /> :addClass(&#039;wikitable&#039;)<br /> :addClass(&#039;plainrowheaders&#039;)<br /> :css(&#039;float&#039;, args.float or &#039;right&#039;)<br /> :css(&#039;clear&#039;, (args.float == &#039;none&#039; and &#039;both&#039;) or args.float or &#039;right&#039;)<br /> :css(&#039;width&#039;, args.width or &#039;auto&#039;)<br /> :css(&#039;margin&#039;, args.float == &#039;left&#039; and &#039;0 1.0em 1.0em 0&#039; or &#039;0 0 1.0em 1.0em&#039;)<br /> :css(&#039;font-size&#039;, &#039;88%&#039;)<br /> <br /> local rowspan = 1 + (entries[&#039;name&#039;] and 1 or 0) + (entries[&#039;meaning&#039;] and 1 or 0)<br /> -- Name<br /> local row = root:tag(&#039;tr&#039;)<br /> row:tag(&#039;th&#039;)<br /> :attr(&#039;scope&#039;, &#039;row&#039;)<br /> :attr(&#039;rowspan&#039;, (rowspan &gt; 1) and rowspan or nil)<br /> :css(&#039;vertical-align&#039;, &#039;middle&#039;)<br /> :wikitext(&#039;Name&#039;)<br /> for k=1,3 do<br /> if subcols[k] &gt; 0 then<br /> local v = langlinks[(args[&#039;lang&#039; .. k] or &#039;&#039;):lower()] or args[&#039;lang&#039; .. k]<br /> row:tag(&#039;th&#039;)<br /> :attr(&#039;scope&#039;, &#039;col&#039;)<br /> :attr(&#039;colspan&#039;, (subcols[k] &gt; 1) and subcols[k] or nil)<br /> :wikitext(v)<br /> end<br /> end<br /> if entries[&#039;name&#039;] then<br /> row = root:tag(&#039;tr&#039;):css(&#039;font-size&#039;, &#039;150%&#039;)<br /> addCells(row, entries[&#039;name&#039;], subcols, nil)<br /> end<br /> if entries[&#039;meaning&#039;] then<br /> row = root:tag(&#039;tr&#039;)<br /> addCells(row, entries[&#039;meaning&#039;], subcols, nil)<br /> end<br /> if entries[&#039;shape&#039;] then<br /> row = root:tag(&#039;tr&#039;)<br /> row:tag(&#039;th&#039;)<br /> :attr(&#039;scope&#039;, &#039;row&#039;)<br /> :attr(&#039;rowspan&#039;, 2)<br /> :css(&#039;vertical-align&#039;, &#039;middle&#039;)<br /> :wikitext(&#039;Shape&#039;)<br /> for k=1,3 do<br /> if subcols[k] &gt; 0 then<br /> local v = shapelinks[(args[&#039;lang&#039; .. k] or &#039;&#039;):lower()] or &#039;&#039;<br /> row:tag(&#039;th&#039;)<br /> :attr(&#039;scope&#039;, &#039;col&#039;)<br /> :attr(&#039;colspan&#039;, (subcols[k] &gt; 1) and subcols[k] or nil)<br /> :wikitext(v)<br /> end<br /> end<br /> row = root:tag(&#039;tr&#039;)<br /> addCells(row, entries[&#039;shape&#039;], subcols, nil)<br /> end<br /> if entries[&#039;unicode hex&#039;] then<br /> row = root:tag(&#039;tr&#039;)<br /> row:tag(&#039;th&#039;)<br /> :attr(&#039;scope&#039;, &#039;row&#039;)<br /> :css(&#039;vertical-align&#039;, &#039;middle&#039;)<br /> :wikitext(&#039;[[Runic (Unicode block)|Unicode]]&#039;)<br /> addCells(row, entries[&#039;unicode hex&#039;], subcols, &#039;300%&#039;)<br /> end<br /> if entries[&#039;transliteration&#039;] then<br /> row = root:tag(&#039;tr&#039;)<br /> row:tag(&#039;th&#039;)<br /> :attr(&#039;scope&#039;, &#039;row&#039;)<br /> :css(&#039;vertical-align&#039;, &#039;middle&#039;)<br /> :wikitext(&#039;[[Runic transliteration and transcription|Transliteration]]&#039;)<br /> addCells(row, entries[&#039;transliteration&#039;], subcols, &#039;120%&#039;)<br /> end<br /> if entries[&#039;transcription&#039;] then<br /> row = root:tag(&#039;tr&#039;)<br /> row:tag(&#039;th&#039;)<br /> :attr(&#039;scope&#039;, &#039;row&#039;)<br /> :css(&#039;vertical-align&#039;, &#039;middle&#039;)<br /> :wikitext(entries[&#039;transliteration&#039;] and &#039;Transcription&#039; <br /> or &#039;[[Runic transliteration and transcription|Transcription]]&#039;)<br /> addCells(row, entries[&#039;transcription&#039;], subcols, &#039;120%&#039;)<br /> end<br /> if entries[&#039;IPA&#039;] then<br /> row = root:tag(&#039;tr&#039;)<br /> row:tag(&#039;th&#039;)<br /> :attr(&#039;scope&#039;, &#039;row&#039;)<br /> :css(&#039;vertical-align&#039;, &#039;middle&#039;)<br /> :wikitext(&#039;[[International Phonetic Alphabet|IPA]]&#039;)<br /> addCells(row, entries[&#039;IPA&#039;], subcols, &#039;150%&#039;)<br /> end<br /> if entries[&#039;position&#039;] then<br /> row = root:tag(&#039;tr&#039;)<br /> row:tag(&#039;th&#039;)<br /> :attr(&#039;scope&#039;, &#039;row&#039;)<br /> :css(&#039;vertical-align&#039;, &#039;middle&#039;)<br /> :wikitext(&#039;Position in rune-row&#039;)<br /> addCells(row, entries[&#039;position&#039;], subcols, nil)<br /> end<br /> <br /> return tostring(root)<br /> end<br /> <br /> return p</div> Frietjes