https://de.wikipedia.org/w/index.php?action=history&feed=atom&title=Modul%3ASeparated_entries Modul:Separated entries - Versionsgeschichte 2025-04-25T21:32:11Z Versionsgeschichte dieser Seite in Wikipedia MediaWiki 1.44.0-wmf.25 https://de.wikipedia.org/w/index.php?title=Modul:Separated_entries&diff=187109951&oldid=prev Du khách Hà Nội: Übernommen von :en:Module:Separated entries, Bearbeitungsgeschichte s. dort 2019-03-31T18:45:03Z <p>Übernommen von <a href="https://en.wikipedia.org/wiki/Module:Separated_entries" class="extiw" title="en:Module:Separated entries">en:Module:Separated entries</a>, Bearbeitungsgeschichte s. dort</p> <p><b>Neue Seite</b></p><div>-- This module takes positional parameters as input and concatenates them with<br /> -- an optional separator. The final separator (the &quot;conjunction&quot;) can be<br /> -- specified independently, enabling natural-language lists like<br /> -- &quot;foo, bar, baz and qux&quot;. The starting parameter can also be specified.<br /> <br /> local compressSparseArray = require(&#039;Module:TableTools&#039;).compressSparseArray<br /> local p = {}<br /> <br /> function p._main(args)<br /> local separator = args.separator<br /> -- Decode (convert to Unicode) HTML escape sequences, such as &quot;&amp;#32;&quot; for space.<br /> and mw.text.decode(args.separator) or &#039;&#039;<br /> local conjunction = args.conjunction and mw.text.decode(args.conjunction) or separator<br /> -- Discard values before the starting parameter.<br /> local start = tonumber(args.start)<br /> if start then<br /> for i = 1, start - 1 do args[i] = nil end<br /> end<br /> -- Discard named parameters.<br /> local values = compressSparseArray(args)<br /> return mw.text.listToText(values, separator, conjunction)<br /> end<br /> <br /> local function makeInvokeFunction(separator, conjunction, first)<br /> return function (frame)<br /> local args = require(&#039;Module:Arguments&#039;).getArgs(frame)<br /> args.separator = separator or args.separator<br /> args.conjunction = conjunction or args.conjunction<br /> args.first = first or args.first<br /> return p._main(args)<br /> end<br /> end<br /> <br /> p.main = makeInvokeFunction()<br /> p.br = makeInvokeFunction(&#039;&lt;br /&gt;&#039;)<br /> p.comma = makeInvokeFunction(mw.message.new(&#039;comma-separator&#039;):plain())<br /> <br /> return p</div> Du khách Hà Nội