<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://isekai.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=FaeriMagic</id>
	<title>The Unofficial Isekai:Slow Life Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://isekai.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=FaeriMagic"/>
	<link rel="alternate" type="text/html" href="https://isekai.wiki/Special:Contributions/FaeriMagic"/>
	<updated>2026-05-23T18:56:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://isekai.wiki/index.php?title=User:FaeriMagic&amp;diff=6558</id>
		<title>User:FaeriMagic</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=User:FaeriMagic&amp;diff=6558"/>
		<updated>2025-08-11T19:57:11Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Fellow Blessings I think they should add ==&lt;br /&gt;
* [[Huowang Dade]] should be blessed by Nene (because raccoon tails) and [[Pan Pan]] (literally adoptive father/daughter).&lt;br /&gt;
* [[Ida]] should be blessed by Raphael since they both are storytellers.&lt;br /&gt;
* [[Mescal]] should be blessed by [[Connie]]. They are literally adoptive father/daughter.&lt;br /&gt;
* [[Reir]] should be blessed by Raphael because they appeared in a Mushroom Travel event and Raphael is Reir&#039;s superior.&lt;br /&gt;
* [[Spipi]] should be blessed by [[Clarice]] because they&#039;re both spiders.&lt;br /&gt;
&lt;br /&gt;
== Wiki Demo ==&lt;br /&gt;
=== Tabber ===&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
|-|First Tab Title=&lt;br /&gt;
First tab content goes here.&lt;br /&gt;
|-|Second Tab Title=&lt;br /&gt;
Second tab content goes here.&lt;br /&gt;
|-|Third Tab Title=&lt;br /&gt;
Third tab content goes here.&lt;br /&gt;
|-|Another Title=&lt;br /&gt;
More content goes here.&lt;br /&gt;
|-|Another Title=&lt;br /&gt;
More content goes here.&lt;br /&gt;
|-|Another Title=&lt;br /&gt;
More content goes here.&lt;br /&gt;
|-|Another Title=&lt;br /&gt;
More content goes here.&lt;br /&gt;
|-|Another Title=&lt;br /&gt;
More content goes here.&lt;br /&gt;
|-|Another Title=&lt;br /&gt;
More content goes here.&lt;br /&gt;
|-|Another Title=&lt;br /&gt;
More content goes here.&lt;br /&gt;
|-|Another Title=&lt;br /&gt;
More content goes here.&lt;br /&gt;
|-|Another Title=&lt;br /&gt;
More content goes here.&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tabber (transclusion) ===&lt;br /&gt;
&amp;lt;tabbertransclude&amp;gt;&lt;br /&gt;
First Page Name|First Tab Title&lt;br /&gt;
Second Page Name|Second Tab Title&lt;br /&gt;
Third Page Name|Third Tab Title&lt;br /&gt;
Another Page Name|Another Title&lt;br /&gt;
Another Page Name|Another Title&lt;br /&gt;
Another Page Name|Another Title&lt;br /&gt;
Another Page Name|Another Title&lt;br /&gt;
Another Page Name|Another Title&lt;br /&gt;
Another Page Name|Another Title&lt;br /&gt;
Another Page Name|Another Title&lt;br /&gt;
Another Page Name|Another Title&lt;br /&gt;
Another Page Name|Another Title&lt;br /&gt;
&amp;lt;/tabbertransclude&amp;gt;Transclusion requires separate pages for each tab.&lt;br /&gt;
&lt;br /&gt;
== Useful pages ==&lt;br /&gt;
* [[Isekai wiki:Manual of Style]]&lt;br /&gt;
&lt;br /&gt;
== Useful Templates ==&lt;br /&gt;
* [[MediaWiki:Common.css]]: The main wiki css.&lt;br /&gt;
* [[Template:Infobox Artifact]]: For displaying quick information about Artifacts.&lt;br /&gt;
* [[Template:Navbox Items]]: For displaying a navbox.&lt;br /&gt;
** [[Template:Navbox Artifacts]]&lt;br /&gt;
** [[Template:Navbox Avatar Frames]]&lt;br /&gt;
** [[Template:Navbox Fragments]] (Character Fragments)&lt;br /&gt;
** [[Template:Navbox Chat Bubbles]]&lt;br /&gt;
** [[Template:Navbox costumes]]&lt;br /&gt;
** [[Template:Navbox Emojis]]&lt;br /&gt;
** [[Template:Navbox Exhibits]]&lt;br /&gt;
** [[Template:Navbox Titles]]&lt;br /&gt;
* [[Template:RightTOC]]: Moves the TOC (Table of Contents) to the right of the page.&lt;br /&gt;
* [[Template:Tasklist]] / [[Template:Task]] / [[Template:Item]]: For displaying items/rewards.&lt;br /&gt;
* [[Template:ItemSourceBox]]: To move item source sections into collapsible boxes when the section gets too long.&lt;br /&gt;
&lt;br /&gt;
=== Quick Formatting ===&lt;br /&gt;
* [[Template:h2info]]: For Information header formatting.&lt;br /&gt;
* [[Template:dg]]: {{dg|For dark green text.}}&lt;br /&gt;
* [[Template:g]]: {{g|For green text.}}&lt;br /&gt;
* [[Template:r]]: {{r|For red text.}}&lt;br /&gt;
* [[Template:y]]: {{y|For yellow text.}}&lt;br /&gt;
* [[Template:C]]: {{c}} For crystal &#039;&#039;&#039;prices&#039;&#039;&#039;.&lt;br /&gt;
* [[Template:V]]: {{v}} Vouchers.&lt;br /&gt;
&lt;br /&gt;
== Useful Categories ==&lt;br /&gt;
* [[:Category:Candidates for deletion]]&lt;br /&gt;
* [[:Category:Disambiguation pages]]&lt;br /&gt;
* [[:Category:Redirects]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Effects]]: Skills and Effects&lt;br /&gt;
* [[:Category:Events]]&lt;br /&gt;
* [[:Category:Images]] 🖼️&lt;br /&gt;
* [[:Category:Items]] &lt;br /&gt;
* [[:Category:Rarity]]&lt;br /&gt;
&lt;br /&gt;
== To-Do ==&lt;br /&gt;
* [[Benefits]]: &lt;br /&gt;
** The &amp;quot;Periodic Tasks&amp;quot; section needs more values.&lt;br /&gt;
** Uhh, the templates i made are not mobile-friendly...&lt;br /&gt;
&lt;br /&gt;
== Unsolved Mysteries ==&lt;br /&gt;
* For some reason, [[:File:Lua-Logo.png]] is not being displayed when [[Module:Lua banner]] is called.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
Family Bond Ranks and the required Intimacy and Blessing Power Stats:&lt;br /&gt;
&amp;lt;100 ( 💚 Acquainted )&lt;br /&gt;
100 ( 💙 Friendly )&lt;br /&gt;
250 ( 💜 Affectionate )&lt;br /&gt;
500 ( 💜 Affectionate⭐ )&lt;br /&gt;
1000 ( 💜 Affectionate⭐ ⭐ )&lt;br /&gt;
2000 ( 🧡 Loving )&lt;br /&gt;
4000 ( 🧡 Loving⭐ )&lt;br /&gt;
8000 ( 🧡 Loving⭐ ⭐ )&lt;br /&gt;
20000 ( ❤️ Forever )&lt;br /&gt;
50000 ( ❤️ Forever⭐ )&lt;br /&gt;
100000 ( ❤️ Forever⭐ ⭐ )&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=MediaWiki:Common.css&amp;diff=6557</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=MediaWiki:Common.css&amp;diff=6557"/>
		<updated>2025-08-11T19:56:20Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Undo revision 6556 by FaeriMagic (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins. */&lt;br /&gt;
&lt;br /&gt;
/* 🍄 Wiki Font (For toolbars and menus) 🍄 */&lt;br /&gt;
@import url(&#039;https://fonts.googleapis.com/css2?family=Shippori+Mincho+B1:wght@400;500;600;700;800&amp;amp;display=swap&#039;);&lt;br /&gt;
body {&lt;br /&gt;
  font-family: &#039;Shippori Mincho B1&#039;, serif;&lt;br /&gt;
  font-weight: 600;&lt;br /&gt;
} &lt;br /&gt;
#content { /* Keeps the main content area as default font. */&lt;br /&gt;
  font-family: sans-serif;&lt;br /&gt;
  font-weight: normal;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* 🍄 Template:StoryChapter 🍄*/&lt;br /&gt;
.story-bold, /* Force bold on specified container. */&lt;br /&gt;
.story-bold *, /* Ensure nested &amp;lt;span&amp;gt;s, bold tags, etc, are also properly styled. */&lt;br /&gt;
.story-bold p {  /* Handles the issue where MediaWiki wraps transcluded content in &amp;lt;p&amp;gt; and prevent it from receiving other styles. */&lt;br /&gt;
  font-family: &#039;Shippori Mincho B1&#039;, serif !important;&lt;br /&gt;
  font-weight: 700 !important;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* Main container style */&lt;br /&gt;
.mp-container {&lt;br /&gt;
    margin: 10px auto;&lt;br /&gt;
    display: table;&lt;br /&gt;
    width: 100%;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Table row style */&lt;br /&gt;
.mp-table-row {&lt;br /&gt;
    display: table-row;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Table cell style */&lt;br /&gt;
&lt;br /&gt;
.mp-table-cell {&lt;br /&gt;
    display: table-cell;&lt;br /&gt;
    border: 3px solid transparent;&lt;br /&gt;
    border-image: linear-gradient(to right, transparent 0%, #6a1b9a 25%, #6a1b9a 75%, transparent 100%);&lt;br /&gt;
    border-image-slice: 1;&lt;br /&gt;
    width: 48%; /* Adjust the width as needed */&lt;br /&gt;
    box-sizing: border-box;&lt;br /&gt;
    margin: 0 auto;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Common style for section headings */&lt;br /&gt;
.mp-section-heading {&lt;br /&gt;
    border-radius: 12px;&lt;br /&gt;
    background: linear-gradient(45deg, #4b0082, #8b008b, #4b0082);&lt;br /&gt;
    color: white;&lt;br /&gt;
    border: 2px solid #632971;&lt;br /&gt;
    text-align: center;&lt;br /&gt;
    font-size: 24px;&lt;br /&gt;
    padding: 12px;&lt;br /&gt;
    line-height: 1.6;&lt;br /&gt;
    position: relative;&lt;br /&gt;
    letter-spacing: 1px;&lt;br /&gt;
    font-family: &#039;Palatino Linotype&#039;, &#039;Book Antiqua&#039;, Palatino, serif;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Style for links within .mp-section-heading */&lt;br /&gt;
.mp-section-heading a {&lt;br /&gt;
    color: white; /* Make the link white */&lt;br /&gt;
    text-decoration: none; /* Remove underline if needed */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.mp-section-spacing {&lt;br /&gt;
        margin-bottom: 10px; /* Adjust the margin as needed */&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* Category filter style */&lt;br /&gt;
.category-filter {&lt;br /&gt;
    background-color: transparent;&lt;br /&gt;
    padding: 10px;&lt;br /&gt;
    border: 1px solid #ddd;&lt;br /&gt;
    border-radius: 8px;&lt;br /&gt;
    margin-bottom: 20px;&lt;br /&gt;
    text-align: center;&lt;br /&gt;
    width: 100%; /* Adjust the width as needed */&lt;br /&gt;
    margin-left: auto;&lt;br /&gt;
    margin-right: auto;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.category-filter h2 {&lt;br /&gt;
    color: #4b0082;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.category-filter ul {&lt;br /&gt;
    list-style-type: none;&lt;br /&gt;
    padding: 0;&lt;br /&gt;
    display: flex;&lt;br /&gt;
    justify-content: center;&lt;br /&gt;
    align-items: center;&lt;br /&gt;
    margin: 5px !important;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.category-filter li {&lt;br /&gt;
    margin: 0 10px; /* Equal spacing on both sides */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.category-link {&lt;br /&gt;
    display: inline-block;&lt;br /&gt;
    padding: 8px 12px;&lt;br /&gt;
    border-radius: 5px;&lt;br /&gt;
    color: #fff;&lt;br /&gt;
    text-align: center;&lt;br /&gt;
    cursor: pointer;&lt;br /&gt;
    transition: background-color 0.3s;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.category-link-characters,&lt;br /&gt;
.category-link-events,&lt;br /&gt;
.category-link-village,&lt;br /&gt;
.category-link-drakenberg,&lt;br /&gt;
.category-link-miscellanea {&lt;br /&gt;
    background-color: #4b0082;&lt;br /&gt;
    flex: 1; /* Equal width for all buttons */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.category-link:hover {&lt;br /&gt;
    background-color: #632971;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.mw-wiki-logo {&lt;br /&gt;
    background-size: 135px auto;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.mw-body {&lt;br /&gt;
    box-shadow: 0 0.25em 0.6em -0.15em rgba(0,0,0,0.15);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#mw-page-base {&lt;br /&gt;
    background-image: url(https://i.imgur.com/LdSoUN9.png) !important;&lt;br /&gt;
    background-color: #FFFFFF00 !important;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#mw-head-base {&lt;br /&gt;
    margin-top: -4.9em&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#p-personal {&lt;br /&gt;
    top: 2px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#p-personal ul {&lt;br /&gt;
    padding-left: 0em;&lt;br /&gt;
    padding-right: 0.5em;&lt;br /&gt;
    padding-top: 0.2em;&lt;br /&gt;
    background-color: rgb(255 255 255 / 53%);&lt;br /&gt;
    border: 2px solid #574D3F;&lt;br /&gt;
    border-radius: 15px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-search-box-input {&lt;br /&gt;
    border-radius: 13px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
body: {&lt;br /&gt;
    background-color: #f2f2f2;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.mw-body {&lt;br /&gt;
    border: none;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-tabs a {&lt;br /&gt;
    background-image: none;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-tabs, .vector-menu-tabs a, #mw-head .vector-menu-dropdown .vector-menu-heading {&lt;br /&gt;
    background-image: none;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-tabs-legacy .selected a, .vector-menu-tabs-legacy .selected a:visited {&lt;br /&gt;
    color: #E9DEC7;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-tabs-legacy .new a, .vector-menu-tabs-legacy .new a:visited {&lt;br /&gt;
    color: #E9DEC7;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-dropdown .vector-menu-heading {&lt;br /&gt;
    color: #E9DEC7;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-tabs-legacy li {&lt;br /&gt;
    border-top-left-radius: 15px;&lt;br /&gt;
    border-top-right-radius: 15px;&lt;br /&gt;
    box-shadow:inset 0px 0px 0px 2px #574D3F;&lt;br /&gt;
    background-color: #4f3220;&lt;br /&gt;
    background-image: none;&lt;br /&gt;
    line-height: 0.8em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-tabs-legacy li a {&lt;br /&gt;
    color: #E9DEC7;&lt;br /&gt;
    height: 3em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-tabs-legacy .selected {&lt;br /&gt;
    background-color: #2C1C12;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-tabs .mw-watchlink.icon a {&lt;br /&gt;
    padding: 3em 0 0 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.mw-body {&lt;br /&gt;
    padding: 0.25em 1.5em 1.5em 1.5em&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.ve-init-mw-desktopArticleTarget {&lt;br /&gt;
    padding-top: 1em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-user-menu-legacy li {&lt;br /&gt;
    padding-top: 0em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
img {&lt;br /&gt;
    max-height: 100% !important;&lt;br /&gt;
    max-width: 100% !important;&lt;br /&gt;
    height: auto !important;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.container {&lt;br /&gt;
  display: flex;&lt;br /&gt;
  margin: 10px auto;&lt;br /&gt;
  max-width: 70%;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.infobox-wrapper {&lt;br /&gt;
  display: flex;&lt;br /&gt;
  flex: 2;&lt;br /&gt;
  flex-grow: 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Style the bio info */&lt;br /&gt;
.bio-info {&lt;br /&gt;
  flex: 1;&lt;br /&gt;
  text-align: center;&lt;br /&gt;
  padding: 20px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Style the bio info text */&lt;br /&gt;
.bio-info p {&lt;br /&gt;
  font-size: 15px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blessings {&lt;br /&gt;
  flex: 1;&lt;br /&gt;
  text-align: center;&lt;br /&gt;
  padding: 20px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blessings-row {&lt;br /&gt;
  display: flex;&lt;br /&gt;
  flex-direction: row;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.shadow {&lt;br /&gt;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.smalltitle {&lt;br /&gt;
  font-size: 10px !important;&lt;br /&gt;
  font-weight: bold;&lt;br /&gt;
  color: #808080;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.charWithType {&lt;br /&gt;
  position: relative;&lt;br /&gt;
  display: inline;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.type {&lt;br /&gt;
  position: absolute;&lt;br /&gt;
  bottom: -0.25em;&lt;br /&gt;
  right: 0.25em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.rarity {&lt;br /&gt;
  position: absolute;&lt;br /&gt;
  top: 0.25em;&lt;br /&gt;
  left: -0.25em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.top-dot {&lt;br /&gt;
  border-top: 1px dotted #00000075;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.left-dot {&lt;br /&gt;
  border-left: 1px dotted #00000075;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.char-info {&lt;br /&gt;
  width: 135px;&lt;br /&gt;
  flex: 1;&lt;br /&gt;
  padding: 20px;&lt;br /&gt;
  background-color: #fbfbfb;&lt;br /&gt;
  box-shadow: 0 0.25em 0.6em -0.15em rgba(0,0,0,0.15);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.toc {&lt;br /&gt;
  padding: 15px;&lt;br /&gt;
  height: 100%;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.toc, .toccolours {&lt;br /&gt;
  background-color: #fbfbfb;&lt;br /&gt;
  box-shadow: 0em 0em 1em 0em rgba(0,0,0,0.15);&lt;br /&gt;
  border: none;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.toc-container {&lt;br /&gt;
  padding: 0px 20px 0px 0px;&lt;br /&gt;
  height: 100%;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.centered-colum {&lt;br /&gt;
  flex-direction: column;&lt;br /&gt;
  align-items: center;&lt;br /&gt;
  text-align: center;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.grid-container {&lt;br /&gt;
  display: flex;&lt;br /&gt;
  justify-content: space-between;&lt;br /&gt;
  gap: 10px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.box {&lt;br /&gt;
  text-align: center;&lt;br /&gt;
  flex: 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.box-style {&lt;br /&gt;
  border: 2px solid #ddd;&lt;br /&gt;
  border-radius: 10px;&lt;br /&gt;
  padding: 20px;&lt;br /&gt;
  background-color: #f0f0f0b5;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.content {&lt;br /&gt;
  width: 100%;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blur {&lt;br /&gt;
  transition: filter 0.15s ease-in-out;&lt;br /&gt;
  overflow: hidden;&lt;br /&gt;
  position: relative;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blur img {&lt;br /&gt;
  filter: blur(20px);&lt;br /&gt;
  transition: filter 0.15s ease-in-out;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blur:hover img {&lt;br /&gt;
  filter: none;&lt;br /&gt;
  transition: filter 0.15s ease-in-out;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blur:hover figcaption {&lt;br /&gt;
  opacity: 0;&lt;br /&gt;
  display: none;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blur &amp;gt; figcaption {&lt;br /&gt;
  opacity: 0.5;&lt;br /&gt;
  padding: 10px 15px 10px 15px !important;&lt;br /&gt;
  border-radius: 15px;&lt;br /&gt;
  background-color: black !important;&lt;br /&gt;
  color: white;&lt;br /&gt;
  position: absolute;&lt;br /&gt;
  top: 50%;&lt;br /&gt;
  left: 50%;&lt;br /&gt;
  transform: translate(-50%, -50%);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blur &amp;gt; figcaption::before {&lt;br /&gt;
  margin-left: 0px !important;&lt;br /&gt;
  float: unset !important;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blur &amp;gt; figcaption:empty {&lt;br /&gt;
  display: none;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.spoiler {&lt;br /&gt;
    background-color: #000; /* Change this to the desired background color */&lt;br /&gt;
    color: #000; /* Change this to the desired text color */&lt;br /&gt;
    cursor: pointer;&lt;br /&gt;
    padding: 5px; /* Adjust the padding as needed */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.spoiler:hover {&lt;br /&gt;
    background-color: transparent; /* Reveals the content on hover */&lt;br /&gt;
    color: inherit;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ol li {&lt;br /&gt;
    margin-left: -0.5em;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=MediaWiki:Common.css&amp;diff=6556</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=MediaWiki:Common.css&amp;diff=6556"/>
		<updated>2025-08-11T19:55:00Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins. */&lt;br /&gt;
&lt;br /&gt;
/* 🍄 Wiki Font (For toolbars and menus) 🍄 */&lt;br /&gt;
@import url(&#039;https://fonts.googleapis.com/css2?family=Shippori+Mincho+B1:wght@400;500;600;700;800&amp;amp;display=swap&#039;);&lt;br /&gt;
body {&lt;br /&gt;
  font-family: &#039;Shippori Mincho B1&#039;, serif;&lt;br /&gt;
  font-weight: 600;&lt;br /&gt;
} &lt;br /&gt;
#content { /* Keeps the main content area as default font. */&lt;br /&gt;
  font-family: sans-serif;&lt;br /&gt;
  font-weight: normal;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* 🍄 Template:StoryChapter 🍄 */&lt;br /&gt;
.story-bold, /* Force bold on specified container. */&lt;br /&gt;
.story-bold *, /* Ensure nested &amp;lt;span&amp;gt;s, bold tags, etc, are also properly styled. */&lt;br /&gt;
.story-bold p {  /* Handles the issue where MediaWiki wraps transcluded content in &amp;lt;p&amp;gt; and prevent it from receiving other styles. */&lt;br /&gt;
  font-family: &#039;Shippori Mincho B1&#039;, serif !important;&lt;br /&gt;
  font-weight: 700 !important;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* 🍄 Module:Message box AND Module:Lua banner (to make images display properly) 🍄 */&lt;br /&gt;
.mbox-image img {&lt;br /&gt;
  width: 30px !important;&lt;br /&gt;
  height: auto !important;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* Main container style */&lt;br /&gt;
.mp-container {&lt;br /&gt;
    margin: 10px auto;&lt;br /&gt;
    display: table;&lt;br /&gt;
    width: 100%;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Table row style */&lt;br /&gt;
.mp-table-row {&lt;br /&gt;
    display: table-row;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Table cell style */&lt;br /&gt;
&lt;br /&gt;
.mp-table-cell {&lt;br /&gt;
    display: table-cell;&lt;br /&gt;
    border: 3px solid transparent;&lt;br /&gt;
    border-image: linear-gradient(to right, transparent 0%, #6a1b9a 25%, #6a1b9a 75%, transparent 100%);&lt;br /&gt;
    border-image-slice: 1;&lt;br /&gt;
    width: 48%; /* Adjust the width as needed */&lt;br /&gt;
    box-sizing: border-box;&lt;br /&gt;
    margin: 0 auto;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Common style for section headings */&lt;br /&gt;
.mp-section-heading {&lt;br /&gt;
    border-radius: 12px;&lt;br /&gt;
    background: linear-gradient(45deg, #4b0082, #8b008b, #4b0082);&lt;br /&gt;
    color: white;&lt;br /&gt;
    border: 2px solid #632971;&lt;br /&gt;
    text-align: center;&lt;br /&gt;
    font-size: 24px;&lt;br /&gt;
    padding: 12px;&lt;br /&gt;
    line-height: 1.6;&lt;br /&gt;
    position: relative;&lt;br /&gt;
    letter-spacing: 1px;&lt;br /&gt;
    font-family: &#039;Palatino Linotype&#039;, &#039;Book Antiqua&#039;, Palatino, serif;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Style for links within .mp-section-heading */&lt;br /&gt;
.mp-section-heading a {&lt;br /&gt;
    color: white; /* Make the link white */&lt;br /&gt;
    text-decoration: none; /* Remove underline if needed */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.mp-section-spacing {&lt;br /&gt;
        margin-bottom: 10px; /* Adjust the margin as needed */&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* Category filter style */&lt;br /&gt;
.category-filter {&lt;br /&gt;
    background-color: transparent;&lt;br /&gt;
    padding: 10px;&lt;br /&gt;
    border: 1px solid #ddd;&lt;br /&gt;
    border-radius: 8px;&lt;br /&gt;
    margin-bottom: 20px;&lt;br /&gt;
    text-align: center;&lt;br /&gt;
    width: 100%; /* Adjust the width as needed */&lt;br /&gt;
    margin-left: auto;&lt;br /&gt;
    margin-right: auto;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.category-filter h2 {&lt;br /&gt;
    color: #4b0082;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.category-filter ul {&lt;br /&gt;
    list-style-type: none;&lt;br /&gt;
    padding: 0;&lt;br /&gt;
    display: flex;&lt;br /&gt;
    justify-content: center;&lt;br /&gt;
    align-items: center;&lt;br /&gt;
    margin: 5px !important;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.category-filter li {&lt;br /&gt;
    margin: 0 10px; /* Equal spacing on both sides */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.category-link {&lt;br /&gt;
    display: inline-block;&lt;br /&gt;
    padding: 8px 12px;&lt;br /&gt;
    border-radius: 5px;&lt;br /&gt;
    color: #fff;&lt;br /&gt;
    text-align: center;&lt;br /&gt;
    cursor: pointer;&lt;br /&gt;
    transition: background-color 0.3s;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.category-link-characters,&lt;br /&gt;
.category-link-events,&lt;br /&gt;
.category-link-village,&lt;br /&gt;
.category-link-drakenberg,&lt;br /&gt;
.category-link-miscellanea {&lt;br /&gt;
    background-color: #4b0082;&lt;br /&gt;
    flex: 1; /* Equal width for all buttons */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.category-link:hover {&lt;br /&gt;
    background-color: #632971;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.mw-wiki-logo {&lt;br /&gt;
    background-size: 135px auto;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.mw-body {&lt;br /&gt;
    box-shadow: 0 0.25em 0.6em -0.15em rgba(0,0,0,0.15);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#mw-page-base {&lt;br /&gt;
    background-image: url(https://i.imgur.com/LdSoUN9.png) !important;&lt;br /&gt;
    background-color: #FFFFFF00 !important;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#mw-head-base {&lt;br /&gt;
    margin-top: -4.9em&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#p-personal {&lt;br /&gt;
    top: 2px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#p-personal ul {&lt;br /&gt;
    padding-left: 0em;&lt;br /&gt;
    padding-right: 0.5em;&lt;br /&gt;
    padding-top: 0.2em;&lt;br /&gt;
    background-color: rgb(255 255 255 / 53%);&lt;br /&gt;
    border: 2px solid #574D3F;&lt;br /&gt;
    border-radius: 15px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-search-box-input {&lt;br /&gt;
    border-radius: 13px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
body: {&lt;br /&gt;
    background-color: #f2f2f2;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.mw-body {&lt;br /&gt;
    border: none;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-tabs a {&lt;br /&gt;
    background-image: none;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-tabs, .vector-menu-tabs a, #mw-head .vector-menu-dropdown .vector-menu-heading {&lt;br /&gt;
    background-image: none;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-tabs-legacy .selected a, .vector-menu-tabs-legacy .selected a:visited {&lt;br /&gt;
    color: #E9DEC7;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-tabs-legacy .new a, .vector-menu-tabs-legacy .new a:visited {&lt;br /&gt;
    color: #E9DEC7;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-dropdown .vector-menu-heading {&lt;br /&gt;
    color: #E9DEC7;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-tabs-legacy li {&lt;br /&gt;
    border-top-left-radius: 15px;&lt;br /&gt;
    border-top-right-radius: 15px;&lt;br /&gt;
    box-shadow:inset 0px 0px 0px 2px #574D3F;&lt;br /&gt;
    background-color: #4f3220;&lt;br /&gt;
    background-image: none;&lt;br /&gt;
    line-height: 0.8em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-tabs-legacy li a {&lt;br /&gt;
    color: #E9DEC7;&lt;br /&gt;
    height: 3em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-tabs-legacy .selected {&lt;br /&gt;
    background-color: #2C1C12;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-menu-tabs .mw-watchlink.icon a {&lt;br /&gt;
    padding: 3em 0 0 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.mw-body {&lt;br /&gt;
    padding: 0.25em 1.5em 1.5em 1.5em&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.ve-init-mw-desktopArticleTarget {&lt;br /&gt;
    padding-top: 1em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.vector-user-menu-legacy li {&lt;br /&gt;
    padding-top: 0em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
img {&lt;br /&gt;
    max-height: 100% !important;&lt;br /&gt;
    max-width: 100% !important;&lt;br /&gt;
    height: auto !important;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.container {&lt;br /&gt;
  display: flex;&lt;br /&gt;
  margin: 10px auto;&lt;br /&gt;
  max-width: 70%;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.infobox-wrapper {&lt;br /&gt;
  display: flex;&lt;br /&gt;
  flex: 2;&lt;br /&gt;
  flex-grow: 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Style the bio info */&lt;br /&gt;
.bio-info {&lt;br /&gt;
  flex: 1;&lt;br /&gt;
  text-align: center;&lt;br /&gt;
  padding: 20px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Style the bio info text */&lt;br /&gt;
.bio-info p {&lt;br /&gt;
  font-size: 15px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blessings {&lt;br /&gt;
  flex: 1;&lt;br /&gt;
  text-align: center;&lt;br /&gt;
  padding: 20px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blessings-row {&lt;br /&gt;
  display: flex;&lt;br /&gt;
  flex-direction: row;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.shadow {&lt;br /&gt;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.smalltitle {&lt;br /&gt;
  font-size: 10px !important;&lt;br /&gt;
  font-weight: bold;&lt;br /&gt;
  color: #808080;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.charWithType {&lt;br /&gt;
  position: relative;&lt;br /&gt;
  display: inline;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.type {&lt;br /&gt;
  position: absolute;&lt;br /&gt;
  bottom: -0.25em;&lt;br /&gt;
  right: 0.25em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.rarity {&lt;br /&gt;
  position: absolute;&lt;br /&gt;
  top: 0.25em;&lt;br /&gt;
  left: -0.25em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.top-dot {&lt;br /&gt;
  border-top: 1px dotted #00000075;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.left-dot {&lt;br /&gt;
  border-left: 1px dotted #00000075;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.char-info {&lt;br /&gt;
  width: 135px;&lt;br /&gt;
  flex: 1;&lt;br /&gt;
  padding: 20px;&lt;br /&gt;
  background-color: #fbfbfb;&lt;br /&gt;
  box-shadow: 0 0.25em 0.6em -0.15em rgba(0,0,0,0.15);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.toc {&lt;br /&gt;
  padding: 15px;&lt;br /&gt;
  height: 100%;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.toc, .toccolours {&lt;br /&gt;
  background-color: #fbfbfb;&lt;br /&gt;
  box-shadow: 0em 0em 1em 0em rgba(0,0,0,0.15);&lt;br /&gt;
  border: none;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.toc-container {&lt;br /&gt;
  padding: 0px 20px 0px 0px;&lt;br /&gt;
  height: 100%;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.centered-colum {&lt;br /&gt;
  flex-direction: column;&lt;br /&gt;
  align-items: center;&lt;br /&gt;
  text-align: center;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.grid-container {&lt;br /&gt;
  display: flex;&lt;br /&gt;
  justify-content: space-between;&lt;br /&gt;
  gap: 10px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.box {&lt;br /&gt;
  text-align: center;&lt;br /&gt;
  flex: 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.box-style {&lt;br /&gt;
  border: 2px solid #ddd;&lt;br /&gt;
  border-radius: 10px;&lt;br /&gt;
  padding: 20px;&lt;br /&gt;
  background-color: #f0f0f0b5;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.content {&lt;br /&gt;
  width: 100%;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blur {&lt;br /&gt;
  transition: filter 0.15s ease-in-out;&lt;br /&gt;
  overflow: hidden;&lt;br /&gt;
  position: relative;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blur img {&lt;br /&gt;
  filter: blur(20px);&lt;br /&gt;
  transition: filter 0.15s ease-in-out;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blur:hover img {&lt;br /&gt;
  filter: none;&lt;br /&gt;
  transition: filter 0.15s ease-in-out;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blur:hover figcaption {&lt;br /&gt;
  opacity: 0;&lt;br /&gt;
  display: none;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blur &amp;gt; figcaption {&lt;br /&gt;
  opacity: 0.5;&lt;br /&gt;
  padding: 10px 15px 10px 15px !important;&lt;br /&gt;
  border-radius: 15px;&lt;br /&gt;
  background-color: black !important;&lt;br /&gt;
  color: white;&lt;br /&gt;
  position: absolute;&lt;br /&gt;
  top: 50%;&lt;br /&gt;
  left: 50%;&lt;br /&gt;
  transform: translate(-50%, -50%);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blur &amp;gt; figcaption::before {&lt;br /&gt;
  margin-left: 0px !important;&lt;br /&gt;
  float: unset !important;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.blur &amp;gt; figcaption:empty {&lt;br /&gt;
  display: none;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.spoiler {&lt;br /&gt;
    background-color: #000; /* Change this to the desired background color */&lt;br /&gt;
    color: #000; /* Change this to the desired text color */&lt;br /&gt;
    cursor: pointer;&lt;br /&gt;
    padding: 5px; /* Adjust the padding as needed */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.spoiler:hover {&lt;br /&gt;
    background-color: transparent; /* Reveals the content on hover */&lt;br /&gt;
    color: inherit;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ol li {&lt;br /&gt;
    margin-left: -0.5em;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6555</id>
		<title>Module:Lua banner</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6555"/>
		<updated>2025-08-11T19:51:40Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Undo revision 6554 by FaeriMagic (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements the {{lua}} template.&lt;br /&gt;
local yesno = require(&#039;Module:Yesno&#039;)&lt;br /&gt;
local mList = require(&#039;Module:List&#039;)&lt;br /&gt;
local mTableTools = require(&#039;Module:TableTools&#039;)&lt;br /&gt;
local mMessageBox = require(&#039;Module:Message box&#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local origArgs = frame:getParent().args&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for k, v in pairs(origArgs) do&lt;br /&gt;
		v = v:match(&#039;^%s*(.-)%s*$&#039;)&lt;br /&gt;
		if v ~= &#039;&#039; then&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local modules = mTableTools.compressSparseArray(args)&lt;br /&gt;
	local box = p.renderBox(modules)&lt;br /&gt;
	local trackingCategories = p.renderTrackingCategories(args, modules)&lt;br /&gt;
	return box .. trackingCategories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderBox(modules)&lt;br /&gt;
	local boxArgs = {}&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		boxArgs.text = &#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: no modules specified&amp;lt;/strong&amp;gt;&#039;&lt;br /&gt;
	else&lt;br /&gt;
		local moduleLinks = {}&lt;br /&gt;
		for i, module in ipairs(modules) do&lt;br /&gt;
			moduleLinks[i] = string.format(&#039;[[:%s]]&#039;, module)&lt;br /&gt;
			local maybeSandbox = mw.title.new(module .. &#039;/sandbox&#039;)&lt;br /&gt;
			if maybeSandbox and maybeSandbox.exists then&lt;br /&gt;
				moduleLinks[i] = moduleLinks[i] .. string.format(&#039; ([[:%s|sandbox]])&#039;, maybeSandbox.fullText)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		local moduleList = mList.makeList(&#039;bulleted&#039;, moduleLinks)&lt;br /&gt;
		local title = mw.title.getCurrentTitle()&lt;br /&gt;
		if title.subpageText == &amp;quot;doc&amp;quot; then&lt;br /&gt;
			title = title.basePageTitle&lt;br /&gt;
		end&lt;br /&gt;
		if title.contentModel == &amp;quot;Scribunto&amp;quot; then&lt;br /&gt;
			boxArgs.text = &#039;This module depends on the following other modules:&#039; .. moduleList&lt;br /&gt;
		else&lt;br /&gt;
			boxArgs.text = &#039;This template  uses [[Wikipedia:Lua|Lua]]:\n&#039; .. moduleList&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	boxArgs.type = &#039;notice&#039;&lt;br /&gt;
	boxArgs.small = true&lt;br /&gt;
	boxArgs.image = &#039;[[File:Lua-Logo.png|30px|alt=|link=]]&#039;&lt;br /&gt;
	return mMessageBox.main(&#039;mbox&#039;, boxArgs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderTrackingCategories(args, modules, titleObj)&lt;br /&gt;
	if yesno(args.nocat) then&lt;br /&gt;
		return &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local cats = {}&lt;br /&gt;
&lt;br /&gt;
	-- Error category&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		cats[#cats + 1] = &#039;Lua templates with errors&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Lua templates category&lt;br /&gt;
	titleObj = titleObj or mw.title.getCurrentTitle()&lt;br /&gt;
	local subpageBlacklist = {&lt;br /&gt;
		doc = true,&lt;br /&gt;
		sandbox = true,&lt;br /&gt;
		sandbox2 = true,&lt;br /&gt;
		testcases = true&lt;br /&gt;
	}&lt;br /&gt;
	if not subpageBlacklist[titleObj.subpageText] then&lt;br /&gt;
		local protCatName&lt;br /&gt;
		if titleObj.namespace == 10 then&lt;br /&gt;
			local category = args.category&lt;br /&gt;
			if not category then&lt;br /&gt;
				local categories = {&lt;br /&gt;
					[&#039;Module:String&#039;] = &#039;Templates based on the String Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Math&#039;] = &#039;Templates based on the Math Lua module&#039;,&lt;br /&gt;
					[&#039;Module:BaseConvert&#039;] = &#039;Templates based on the BaseConvert Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Citation/CS1&#039;] = &#039;Templates based on the Citation/CS1 Lua module&#039;&lt;br /&gt;
				}&lt;br /&gt;
				category = modules[1] and categories[modules[1]]&lt;br /&gt;
				category = category or &#039;Lua-based templates&#039;&lt;br /&gt;
			end	&lt;br /&gt;
			cats[#cats + 1] = category&lt;br /&gt;
			protCatName = &amp;quot;Templates using under-protected Lua modules&amp;quot;&lt;br /&gt;
		elseif titleObj.namespace == 828 then&lt;br /&gt;
			protCatName = &amp;quot;Modules depending on under-protected modules&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		if not args.noprotcat and protCatName then&lt;br /&gt;
			local protLevels = {&lt;br /&gt;
				autoconfirmed = 1,&lt;br /&gt;
				extendedconfirmed = 2,&lt;br /&gt;
				templateeditor = 3,&lt;br /&gt;
				sysop = 4&lt;br /&gt;
			}&lt;br /&gt;
			local currentProt&lt;br /&gt;
			if titleObj.id ~= 0 then&lt;br /&gt;
				-- id is 0 (page does not exist) if am previewing before creating a template.&lt;br /&gt;
				currentProt = titleObj.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
			end&lt;br /&gt;
			if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end&lt;br /&gt;
			for i, module in ipairs(modules) do&lt;br /&gt;
				if module ~= &amp;quot;WP:libraryUtil&amp;quot; then&lt;br /&gt;
					local moduleTitle = mw.title.new(module)&lt;br /&gt;
					local moduleProt = moduleTitle and moduleTitle.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
					if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end&lt;br /&gt;
					if moduleProt &amp;lt; currentProt then&lt;br /&gt;
						cats[#cats + 1] = protCatName&lt;br /&gt;
						break&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for i, cat in ipairs(cats) do&lt;br /&gt;
		cats[i] = string.format(&#039;[[Category:%s]]&#039;, cat)&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(cats)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6554</id>
		<title>Module:Lua banner</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6554"/>
		<updated>2025-08-11T19:51:30Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements the {{lua}} template.&lt;br /&gt;
local yesno = require(&#039;Module:Yesno&#039;)&lt;br /&gt;
local mList = require(&#039;Module:List&#039;)&lt;br /&gt;
local mTableTools = require(&#039;Module:TableTools&#039;)&lt;br /&gt;
local mMessageBox = require(&#039;Module:Message box&#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local origArgs = frame:getParent().args&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for k, v in pairs(origArgs) do&lt;br /&gt;
		v = v:match(&#039;^%s*(.-)%s*$&#039;)&lt;br /&gt;
		if v ~= &#039;&#039; then&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local modules = mTableTools.compressSparseArray(args)&lt;br /&gt;
	local box = p.renderBox(modules)&lt;br /&gt;
	local trackingCategories = p.renderTrackingCategories(args, modules)&lt;br /&gt;
	return box .. trackingCategories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderBox(modules)&lt;br /&gt;
	local boxArgs = {}&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		boxArgs.text = &#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: no modules specified&amp;lt;/strong&amp;gt;&#039;&lt;br /&gt;
	else&lt;br /&gt;
		local moduleLinks = {}&lt;br /&gt;
		for i, module in ipairs(modules) do&lt;br /&gt;
			moduleLinks[i] = string.format(&#039;[[:%s]]&#039;, module)&lt;br /&gt;
			local maybeSandbox = mw.title.new(module .. &#039;/sandbox&#039;)&lt;br /&gt;
			if maybeSandbox and maybeSandbox.exists then&lt;br /&gt;
				moduleLinks[i] = moduleLinks[i] .. string.format(&#039; ([[:%s|sandbox]])&#039;, maybeSandbox.fullText)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		local moduleList = mList.makeList(&#039;bulleted&#039;, moduleLinks)&lt;br /&gt;
		local title = mw.title.getCurrentTitle()&lt;br /&gt;
		if title.subpageText == &amp;quot;doc&amp;quot; then&lt;br /&gt;
			title = title.basePageTitle&lt;br /&gt;
		end&lt;br /&gt;
		if title.contentModel == &amp;quot;Scribunto&amp;quot; then&lt;br /&gt;
			boxArgs.text = &#039;This module depends on the following other modules:&#039; .. moduleList&lt;br /&gt;
		else&lt;br /&gt;
			boxArgs.text = &#039;This template  uses [[Wikipedia:Lua|Lua]]:\n&#039; .. moduleList&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	boxArgs.type = &#039;notice&#039;&lt;br /&gt;
	boxArgs.small = true&lt;br /&gt;
	boxArgs.image = &#039;[[File:Lua-Logo.png|30px]]&#039;&lt;br /&gt;
	return mMessageBox.main(&#039;mbox&#039;, boxArgs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderTrackingCategories(args, modules, titleObj)&lt;br /&gt;
	if yesno(args.nocat) then&lt;br /&gt;
		return &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local cats = {}&lt;br /&gt;
&lt;br /&gt;
	-- Error category&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		cats[#cats + 1] = &#039;Lua templates with errors&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Lua templates category&lt;br /&gt;
	titleObj = titleObj or mw.title.getCurrentTitle()&lt;br /&gt;
	local subpageBlacklist = {&lt;br /&gt;
		doc = true,&lt;br /&gt;
		sandbox = true,&lt;br /&gt;
		sandbox2 = true,&lt;br /&gt;
		testcases = true&lt;br /&gt;
	}&lt;br /&gt;
	if not subpageBlacklist[titleObj.subpageText] then&lt;br /&gt;
		local protCatName&lt;br /&gt;
		if titleObj.namespace == 10 then&lt;br /&gt;
			local category = args.category&lt;br /&gt;
			if not category then&lt;br /&gt;
				local categories = {&lt;br /&gt;
					[&#039;Module:String&#039;] = &#039;Templates based on the String Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Math&#039;] = &#039;Templates based on the Math Lua module&#039;,&lt;br /&gt;
					[&#039;Module:BaseConvert&#039;] = &#039;Templates based on the BaseConvert Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Citation/CS1&#039;] = &#039;Templates based on the Citation/CS1 Lua module&#039;&lt;br /&gt;
				}&lt;br /&gt;
				category = modules[1] and categories[modules[1]]&lt;br /&gt;
				category = category or &#039;Lua-based templates&#039;&lt;br /&gt;
			end	&lt;br /&gt;
			cats[#cats + 1] = category&lt;br /&gt;
			protCatName = &amp;quot;Templates using under-protected Lua modules&amp;quot;&lt;br /&gt;
		elseif titleObj.namespace == 828 then&lt;br /&gt;
			protCatName = &amp;quot;Modules depending on under-protected modules&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		if not args.noprotcat and protCatName then&lt;br /&gt;
			local protLevels = {&lt;br /&gt;
				autoconfirmed = 1,&lt;br /&gt;
				extendedconfirmed = 2,&lt;br /&gt;
				templateeditor = 3,&lt;br /&gt;
				sysop = 4&lt;br /&gt;
			}&lt;br /&gt;
			local currentProt&lt;br /&gt;
			if titleObj.id ~= 0 then&lt;br /&gt;
				-- id is 0 (page does not exist) if am previewing before creating a template.&lt;br /&gt;
				currentProt = titleObj.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
			end&lt;br /&gt;
			if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end&lt;br /&gt;
			for i, module in ipairs(modules) do&lt;br /&gt;
				if module ~= &amp;quot;WP:libraryUtil&amp;quot; then&lt;br /&gt;
					local moduleTitle = mw.title.new(module)&lt;br /&gt;
					local moduleProt = moduleTitle and moduleTitle.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
					if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end&lt;br /&gt;
					if moduleProt &amp;lt; currentProt then&lt;br /&gt;
						cats[#cats + 1] = protCatName&lt;br /&gt;
						break&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for i, cat in ipairs(cats) do&lt;br /&gt;
		cats[i] = string.format(&#039;[[Category:%s]]&#039;, cat)&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(cats)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6553</id>
		<title>Module:Lua banner</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6553"/>
		<updated>2025-08-11T19:49:07Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements the {{lua}} template.&lt;br /&gt;
local yesno = require(&#039;Module:Yesno&#039;)&lt;br /&gt;
local mList = require(&#039;Module:List&#039;)&lt;br /&gt;
local mTableTools = require(&#039;Module:TableTools&#039;)&lt;br /&gt;
local mMessageBox = require(&#039;Module:Message box&#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local origArgs = frame:getParent().args&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for k, v in pairs(origArgs) do&lt;br /&gt;
		v = v:match(&#039;^%s*(.-)%s*$&#039;)&lt;br /&gt;
		if v ~= &#039;&#039; then&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local modules = mTableTools.compressSparseArray(args)&lt;br /&gt;
	local box = p.renderBox(modules)&lt;br /&gt;
	local trackingCategories = p.renderTrackingCategories(args, modules)&lt;br /&gt;
	return box .. trackingCategories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderBox(modules)&lt;br /&gt;
	local boxArgs = {}&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		boxArgs.text = &#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: no modules specified&amp;lt;/strong&amp;gt;&#039;&lt;br /&gt;
	else&lt;br /&gt;
		local moduleLinks = {}&lt;br /&gt;
		for i, module in ipairs(modules) do&lt;br /&gt;
			moduleLinks[i] = string.format(&#039;[[:%s]]&#039;, module)&lt;br /&gt;
			local maybeSandbox = mw.title.new(module .. &#039;/sandbox&#039;)&lt;br /&gt;
			if maybeSandbox and maybeSandbox.exists then&lt;br /&gt;
				moduleLinks[i] = moduleLinks[i] .. string.format(&#039; ([[:%s|sandbox]])&#039;, maybeSandbox.fullText)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		local moduleList = mList.makeList(&#039;bulleted&#039;, moduleLinks)&lt;br /&gt;
		local title = mw.title.getCurrentTitle()&lt;br /&gt;
		if title.subpageText == &amp;quot;doc&amp;quot; then&lt;br /&gt;
			title = title.basePageTitle&lt;br /&gt;
		end&lt;br /&gt;
		if title.contentModel == &amp;quot;Scribunto&amp;quot; then&lt;br /&gt;
			boxArgs.text = &#039;This module depends on the following other modules:&#039; .. moduleList&lt;br /&gt;
		else&lt;br /&gt;
			boxArgs.text = &#039;This template  uses [[Wikipedia:Lua|Lua]]:\n&#039; .. moduleList&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	boxArgs.type = &#039;notice&#039;&lt;br /&gt;
	boxArgs.small = true&lt;br /&gt;
	boxArgs.image = &#039;[[File:Lua-Logo.png|30px|alt=|link=]]&#039;&lt;br /&gt;
	return mMessageBox.main(&#039;mbox&#039;, boxArgs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderTrackingCategories(args, modules, titleObj)&lt;br /&gt;
	if yesno(args.nocat) then&lt;br /&gt;
		return &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local cats = {}&lt;br /&gt;
&lt;br /&gt;
	-- Error category&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		cats[#cats + 1] = &#039;Lua templates with errors&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Lua templates category&lt;br /&gt;
	titleObj = titleObj or mw.title.getCurrentTitle()&lt;br /&gt;
	local subpageBlacklist = {&lt;br /&gt;
		doc = true,&lt;br /&gt;
		sandbox = true,&lt;br /&gt;
		sandbox2 = true,&lt;br /&gt;
		testcases = true&lt;br /&gt;
	}&lt;br /&gt;
	if not subpageBlacklist[titleObj.subpageText] then&lt;br /&gt;
		local protCatName&lt;br /&gt;
		if titleObj.namespace == 10 then&lt;br /&gt;
			local category = args.category&lt;br /&gt;
			if not category then&lt;br /&gt;
				local categories = {&lt;br /&gt;
					[&#039;Module:String&#039;] = &#039;Templates based on the String Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Math&#039;] = &#039;Templates based on the Math Lua module&#039;,&lt;br /&gt;
					[&#039;Module:BaseConvert&#039;] = &#039;Templates based on the BaseConvert Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Citation/CS1&#039;] = &#039;Templates based on the Citation/CS1 Lua module&#039;&lt;br /&gt;
				}&lt;br /&gt;
				category = modules[1] and categories[modules[1]]&lt;br /&gt;
				category = category or &#039;Lua-based templates&#039;&lt;br /&gt;
			end	&lt;br /&gt;
			cats[#cats + 1] = category&lt;br /&gt;
			protCatName = &amp;quot;Templates using under-protected Lua modules&amp;quot;&lt;br /&gt;
		elseif titleObj.namespace == 828 then&lt;br /&gt;
			protCatName = &amp;quot;Modules depending on under-protected modules&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		if not args.noprotcat and protCatName then&lt;br /&gt;
			local protLevels = {&lt;br /&gt;
				autoconfirmed = 1,&lt;br /&gt;
				extendedconfirmed = 2,&lt;br /&gt;
				templateeditor = 3,&lt;br /&gt;
				sysop = 4&lt;br /&gt;
			}&lt;br /&gt;
			local currentProt&lt;br /&gt;
			if titleObj.id ~= 0 then&lt;br /&gt;
				-- id is 0 (page does not exist) if am previewing before creating a template.&lt;br /&gt;
				currentProt = titleObj.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
			end&lt;br /&gt;
			if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end&lt;br /&gt;
			for i, module in ipairs(modules) do&lt;br /&gt;
				if module ~= &amp;quot;WP:libraryUtil&amp;quot; then&lt;br /&gt;
					local moduleTitle = mw.title.new(module)&lt;br /&gt;
					local moduleProt = moduleTitle and moduleTitle.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
					if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end&lt;br /&gt;
					if moduleProt &amp;lt; currentProt then&lt;br /&gt;
						cats[#cats + 1] = protCatName&lt;br /&gt;
						break&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for i, cat in ipairs(cats) do&lt;br /&gt;
		cats[i] = string.format(&#039;[[Category:%s]]&#039;, cat)&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(cats)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6552</id>
		<title>Module:Lua banner</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6552"/>
		<updated>2025-08-11T19:48:22Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements the {{lua}} template.&lt;br /&gt;
local yesno = require(&#039;Module:Yesno&#039;)&lt;br /&gt;
local mList = require(&#039;Module:List&#039;)&lt;br /&gt;
local mTableTools = require(&#039;Module:TableTools&#039;)&lt;br /&gt;
local mMessageBox = require(&#039;Module:Message box&#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local origArgs = frame:getParent().args&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for k, v in pairs(origArgs) do&lt;br /&gt;
		v = v:match(&#039;^%s*(.-)%s*$&#039;)&lt;br /&gt;
		if v ~= &#039;&#039; then&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local modules = mTableTools.compressSparseArray(args)&lt;br /&gt;
	local box = p.renderBox(modules)&lt;br /&gt;
	local trackingCategories = p.renderTrackingCategories(args, modules)&lt;br /&gt;
	return box .. trackingCategories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderBox(modules)&lt;br /&gt;
	local boxArgs = {}&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		boxArgs.text = &#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: no modules specified&amp;lt;/strong&amp;gt;&#039;&lt;br /&gt;
	else&lt;br /&gt;
		local moduleLinks = {}&lt;br /&gt;
		for i, module in ipairs(modules) do&lt;br /&gt;
			moduleLinks[i] = string.format(&#039;[[:%s]]&#039;, module)&lt;br /&gt;
			local maybeSandbox = mw.title.new(module .. &#039;/sandbox&#039;)&lt;br /&gt;
			if maybeSandbox and maybeSandbox.exists then&lt;br /&gt;
				moduleLinks[i] = moduleLinks[i] .. string.format(&#039; ([[:%s|sandbox]])&#039;, maybeSandbox.fullText)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		local moduleList = mList.makeList(&#039;bulleted&#039;, moduleLinks)&lt;br /&gt;
		local title = mw.title.getCurrentTitle()&lt;br /&gt;
		if title.subpageText == &amp;quot;doc&amp;quot; then&lt;br /&gt;
			title = title.basePageTitle&lt;br /&gt;
		end&lt;br /&gt;
		if title.contentModel == &amp;quot;Scribunto&amp;quot; then&lt;br /&gt;
			boxArgs.text = &#039;This module depends on the following other modules:&#039; .. moduleList&lt;br /&gt;
		else&lt;br /&gt;
			boxArgs.text = &#039;This template  uses [[Wikipedia:Lua|Lua]]:\n&#039; .. moduleList&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	boxArgs.type = &#039;notice&#039;&lt;br /&gt;
	boxArgs.small = true&lt;br /&gt;
	boxArgs.image = [[File:Lua-Logo.png|30px|alt=|link=]]&lt;br /&gt;
	return mMessageBox.main(&#039;mbox&#039;, boxArgs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderTrackingCategories(args, modules, titleObj)&lt;br /&gt;
	if yesno(args.nocat) then&lt;br /&gt;
		return &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local cats = {}&lt;br /&gt;
&lt;br /&gt;
	-- Error category&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		cats[#cats + 1] = &#039;Lua templates with errors&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Lua templates category&lt;br /&gt;
	titleObj = titleObj or mw.title.getCurrentTitle()&lt;br /&gt;
	local subpageBlacklist = {&lt;br /&gt;
		doc = true,&lt;br /&gt;
		sandbox = true,&lt;br /&gt;
		sandbox2 = true,&lt;br /&gt;
		testcases = true&lt;br /&gt;
	}&lt;br /&gt;
	if not subpageBlacklist[titleObj.subpageText] then&lt;br /&gt;
		local protCatName&lt;br /&gt;
		if titleObj.namespace == 10 then&lt;br /&gt;
			local category = args.category&lt;br /&gt;
			if not category then&lt;br /&gt;
				local categories = {&lt;br /&gt;
					[&#039;Module:String&#039;] = &#039;Templates based on the String Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Math&#039;] = &#039;Templates based on the Math Lua module&#039;,&lt;br /&gt;
					[&#039;Module:BaseConvert&#039;] = &#039;Templates based on the BaseConvert Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Citation/CS1&#039;] = &#039;Templates based on the Citation/CS1 Lua module&#039;&lt;br /&gt;
				}&lt;br /&gt;
				category = modules[1] and categories[modules[1]]&lt;br /&gt;
				category = category or &#039;Lua-based templates&#039;&lt;br /&gt;
			end	&lt;br /&gt;
			cats[#cats + 1] = category&lt;br /&gt;
			protCatName = &amp;quot;Templates using under-protected Lua modules&amp;quot;&lt;br /&gt;
		elseif titleObj.namespace == 828 then&lt;br /&gt;
			protCatName = &amp;quot;Modules depending on under-protected modules&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		if not args.noprotcat and protCatName then&lt;br /&gt;
			local protLevels = {&lt;br /&gt;
				autoconfirmed = 1,&lt;br /&gt;
				extendedconfirmed = 2,&lt;br /&gt;
				templateeditor = 3,&lt;br /&gt;
				sysop = 4&lt;br /&gt;
			}&lt;br /&gt;
			local currentProt&lt;br /&gt;
			if titleObj.id ~= 0 then&lt;br /&gt;
				-- id is 0 (page does not exist) if am previewing before creating a template.&lt;br /&gt;
				currentProt = titleObj.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
			end&lt;br /&gt;
			if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end&lt;br /&gt;
			for i, module in ipairs(modules) do&lt;br /&gt;
				if module ~= &amp;quot;WP:libraryUtil&amp;quot; then&lt;br /&gt;
					local moduleTitle = mw.title.new(module)&lt;br /&gt;
					local moduleProt = moduleTitle and moduleTitle.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
					if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end&lt;br /&gt;
					if moduleProt &amp;lt; currentProt then&lt;br /&gt;
						cats[#cats + 1] = protCatName&lt;br /&gt;
						break&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for i, cat in ipairs(cats) do&lt;br /&gt;
		cats[i] = string.format(&#039;[[Category:%s]]&#039;, cat)&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(cats)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6551</id>
		<title>Module:Lua banner</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6551"/>
		<updated>2025-08-11T19:47:43Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements the {{lua}} template.&lt;br /&gt;
local yesno = require(&#039;Module:Yesno&#039;)&lt;br /&gt;
local mList = require(&#039;Module:List&#039;)&lt;br /&gt;
local mTableTools = require(&#039;Module:TableTools&#039;)&lt;br /&gt;
local mMessageBox = require(&#039;Module:Message box&#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local origArgs = frame:getParent().args&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for k, v in pairs(origArgs) do&lt;br /&gt;
		v = v:match(&#039;^%s*(.-)%s*$&#039;)&lt;br /&gt;
		if v ~= &#039;&#039; then&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local modules = mTableTools.compressSparseArray(args)&lt;br /&gt;
	local box = p.renderBox(modules)&lt;br /&gt;
	local trackingCategories = p.renderTrackingCategories(args, modules)&lt;br /&gt;
	return box .. trackingCategories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderBox(modules)&lt;br /&gt;
	local boxArgs = {}&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		boxArgs.text = &#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: no modules specified&amp;lt;/strong&amp;gt;&#039;&lt;br /&gt;
	else&lt;br /&gt;
		local moduleLinks = {}&lt;br /&gt;
		for i, module in ipairs(modules) do&lt;br /&gt;
			moduleLinks[i] = string.format(&#039;[[:%s]]&#039;, module)&lt;br /&gt;
			local maybeSandbox = mw.title.new(module .. &#039;/sandbox&#039;)&lt;br /&gt;
			if maybeSandbox and maybeSandbox.exists then&lt;br /&gt;
				moduleLinks[i] = moduleLinks[i] .. string.format(&#039; ([[:%s|sandbox]])&#039;, maybeSandbox.fullText)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		local moduleList = mList.makeList(&#039;bulleted&#039;, moduleLinks)&lt;br /&gt;
		local title = mw.title.getCurrentTitle()&lt;br /&gt;
		if title.subpageText == &amp;quot;doc&amp;quot; then&lt;br /&gt;
			title = title.basePageTitle&lt;br /&gt;
		end&lt;br /&gt;
		if title.contentModel == &amp;quot;Scribunto&amp;quot; then&lt;br /&gt;
			boxArgs.text = &#039;This module depends on the following other modules:&#039; .. moduleList&lt;br /&gt;
		else&lt;br /&gt;
			boxArgs.text = &#039;This template  uses [[Wikipedia:Lua|Lua]]:\n&#039; .. moduleList&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	boxArgs.type = &#039;notice&#039;&lt;br /&gt;
	boxArgs.small = true&lt;br /&gt;
	boxArgs.image = &#039;[[File:Lua-Logo.png|30px|alt=|link=]]&#039;&lt;br /&gt;
	return mMessageBox.main(&#039;mbox&#039;, boxArgs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderTrackingCategories(args, modules, titleObj)&lt;br /&gt;
	if yesno(args.nocat) then&lt;br /&gt;
		return &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local cats = {}&lt;br /&gt;
&lt;br /&gt;
	-- Error category&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		cats[#cats + 1] = &#039;Lua templates with errors&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Lua templates category&lt;br /&gt;
	titleObj = titleObj or mw.title.getCurrentTitle()&lt;br /&gt;
	local subpageBlacklist = {&lt;br /&gt;
		doc = true,&lt;br /&gt;
		sandbox = true,&lt;br /&gt;
		sandbox2 = true,&lt;br /&gt;
		testcases = true&lt;br /&gt;
	}&lt;br /&gt;
	if not subpageBlacklist[titleObj.subpageText] then&lt;br /&gt;
		local protCatName&lt;br /&gt;
		if titleObj.namespace == 10 then&lt;br /&gt;
			local category = args.category&lt;br /&gt;
			if not category then&lt;br /&gt;
				local categories = {&lt;br /&gt;
					[&#039;Module:String&#039;] = &#039;Templates based on the String Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Math&#039;] = &#039;Templates based on the Math Lua module&#039;,&lt;br /&gt;
					[&#039;Module:BaseConvert&#039;] = &#039;Templates based on the BaseConvert Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Citation/CS1&#039;] = &#039;Templates based on the Citation/CS1 Lua module&#039;&lt;br /&gt;
				}&lt;br /&gt;
				category = modules[1] and categories[modules[1]]&lt;br /&gt;
				category = category or &#039;Lua-based templates&#039;&lt;br /&gt;
			end	&lt;br /&gt;
			cats[#cats + 1] = category&lt;br /&gt;
			protCatName = &amp;quot;Templates using under-protected Lua modules&amp;quot;&lt;br /&gt;
		elseif titleObj.namespace == 828 then&lt;br /&gt;
			protCatName = &amp;quot;Modules depending on under-protected modules&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		if not args.noprotcat and protCatName then&lt;br /&gt;
			local protLevels = {&lt;br /&gt;
				autoconfirmed = 1,&lt;br /&gt;
				extendedconfirmed = 2,&lt;br /&gt;
				templateeditor = 3,&lt;br /&gt;
				sysop = 4&lt;br /&gt;
			}&lt;br /&gt;
			local currentProt&lt;br /&gt;
			if titleObj.id ~= 0 then&lt;br /&gt;
				-- id is 0 (page does not exist) if am previewing before creating a template.&lt;br /&gt;
				currentProt = titleObj.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
			end&lt;br /&gt;
			if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end&lt;br /&gt;
			for i, module in ipairs(modules) do&lt;br /&gt;
				if module ~= &amp;quot;WP:libraryUtil&amp;quot; then&lt;br /&gt;
					local moduleTitle = mw.title.new(module)&lt;br /&gt;
					local moduleProt = moduleTitle and moduleTitle.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
					if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end&lt;br /&gt;
					if moduleProt &amp;lt; currentProt then&lt;br /&gt;
						cats[#cats + 1] = protCatName&lt;br /&gt;
						break&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for i, cat in ipairs(cats) do&lt;br /&gt;
		cats[i] = string.format(&#039;[[Category:%s]]&#039;, cat)&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(cats)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6550</id>
		<title>Module:Lua banner</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6550"/>
		<updated>2025-08-11T19:47:21Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements the {{lua}} template.&lt;br /&gt;
local yesno = require(&#039;Module:Yesno&#039;)&lt;br /&gt;
local mList = require(&#039;Module:List&#039;)&lt;br /&gt;
local mTableTools = require(&#039;Module:TableTools&#039;)&lt;br /&gt;
local mMessageBox = require(&#039;Module:Message box&#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local origArgs = frame:getParent().args&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for k, v in pairs(origArgs) do&lt;br /&gt;
		v = v:match(&#039;^%s*(.-)%s*$&#039;)&lt;br /&gt;
		if v ~= &#039;&#039; then&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local modules = mTableTools.compressSparseArray(args)&lt;br /&gt;
	local box = p.renderBox(modules)&lt;br /&gt;
	local trackingCategories = p.renderTrackingCategories(args, modules)&lt;br /&gt;
	return box .. trackingCategories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderBox(modules)&lt;br /&gt;
	local boxArgs = {}&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		boxArgs.text = &#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: no modules specified&amp;lt;/strong&amp;gt;&#039;&lt;br /&gt;
	else&lt;br /&gt;
		local moduleLinks = {}&lt;br /&gt;
		for i, module in ipairs(modules) do&lt;br /&gt;
			moduleLinks[i] = string.format(&#039;[[:%s]]&#039;, module)&lt;br /&gt;
			local maybeSandbox = mw.title.new(module .. &#039;/sandbox&#039;)&lt;br /&gt;
			if maybeSandbox and maybeSandbox.exists then&lt;br /&gt;
				moduleLinks[i] = moduleLinks[i] .. string.format(&#039; ([[:%s|sandbox]])&#039;, maybeSandbox.fullText)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		local moduleList = mList.makeList(&#039;bulleted&#039;, moduleLinks)&lt;br /&gt;
		local title = mw.title.getCurrentTitle()&lt;br /&gt;
		if title.subpageText == &amp;quot;doc&amp;quot; then&lt;br /&gt;
			title = title.basePageTitle&lt;br /&gt;
		end&lt;br /&gt;
		if title.contentModel == &amp;quot;Scribunto&amp;quot; then&lt;br /&gt;
			boxArgs.text = &#039;This module depends on the following other modules:&#039; .. moduleList&lt;br /&gt;
		else&lt;br /&gt;
			boxArgs.text = &#039;This template  uses [[Wikipedia:Lua|Lua]]:\n&#039; .. moduleList&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	boxArgs.type = &#039;notice&#039;&lt;br /&gt;
	boxArgs.small = true&lt;br /&gt;
	boxArgs.image = &#039;[[:File:Lua-Logo.png|30px|alt=|link=]]&#039;&lt;br /&gt;
	return mMessageBox.main(&#039;mbox&#039;, boxArgs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderTrackingCategories(args, modules, titleObj)&lt;br /&gt;
	if yesno(args.nocat) then&lt;br /&gt;
		return &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local cats = {}&lt;br /&gt;
&lt;br /&gt;
	-- Error category&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		cats[#cats + 1] = &#039;Lua templates with errors&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Lua templates category&lt;br /&gt;
	titleObj = titleObj or mw.title.getCurrentTitle()&lt;br /&gt;
	local subpageBlacklist = {&lt;br /&gt;
		doc = true,&lt;br /&gt;
		sandbox = true,&lt;br /&gt;
		sandbox2 = true,&lt;br /&gt;
		testcases = true&lt;br /&gt;
	}&lt;br /&gt;
	if not subpageBlacklist[titleObj.subpageText] then&lt;br /&gt;
		local protCatName&lt;br /&gt;
		if titleObj.namespace == 10 then&lt;br /&gt;
			local category = args.category&lt;br /&gt;
			if not category then&lt;br /&gt;
				local categories = {&lt;br /&gt;
					[&#039;Module:String&#039;] = &#039;Templates based on the String Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Math&#039;] = &#039;Templates based on the Math Lua module&#039;,&lt;br /&gt;
					[&#039;Module:BaseConvert&#039;] = &#039;Templates based on the BaseConvert Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Citation/CS1&#039;] = &#039;Templates based on the Citation/CS1 Lua module&#039;&lt;br /&gt;
				}&lt;br /&gt;
				category = modules[1] and categories[modules[1]]&lt;br /&gt;
				category = category or &#039;Lua-based templates&#039;&lt;br /&gt;
			end	&lt;br /&gt;
			cats[#cats + 1] = category&lt;br /&gt;
			protCatName = &amp;quot;Templates using under-protected Lua modules&amp;quot;&lt;br /&gt;
		elseif titleObj.namespace == 828 then&lt;br /&gt;
			protCatName = &amp;quot;Modules depending on under-protected modules&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		if not args.noprotcat and protCatName then&lt;br /&gt;
			local protLevels = {&lt;br /&gt;
				autoconfirmed = 1,&lt;br /&gt;
				extendedconfirmed = 2,&lt;br /&gt;
				templateeditor = 3,&lt;br /&gt;
				sysop = 4&lt;br /&gt;
			}&lt;br /&gt;
			local currentProt&lt;br /&gt;
			if titleObj.id ~= 0 then&lt;br /&gt;
				-- id is 0 (page does not exist) if am previewing before creating a template.&lt;br /&gt;
				currentProt = titleObj.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
			end&lt;br /&gt;
			if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end&lt;br /&gt;
			for i, module in ipairs(modules) do&lt;br /&gt;
				if module ~= &amp;quot;WP:libraryUtil&amp;quot; then&lt;br /&gt;
					local moduleTitle = mw.title.new(module)&lt;br /&gt;
					local moduleProt = moduleTitle and moduleTitle.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
					if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end&lt;br /&gt;
					if moduleProt &amp;lt; currentProt then&lt;br /&gt;
						cats[#cats + 1] = protCatName&lt;br /&gt;
						break&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for i, cat in ipairs(cats) do&lt;br /&gt;
		cats[i] = string.format(&#039;[[Category:%s]]&#039;, cat)&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(cats)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6549</id>
		<title>Module:Lua banner</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6549"/>
		<updated>2025-08-11T19:47:00Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements the {{lua}} template.&lt;br /&gt;
local yesno = require(&#039;Module:Yesno&#039;)&lt;br /&gt;
local mList = require(&#039;Module:List&#039;)&lt;br /&gt;
local mTableTools = require(&#039;Module:TableTools&#039;)&lt;br /&gt;
local mMessageBox = require(&#039;Module:Message box&#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local origArgs = frame:getParent().args&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for k, v in pairs(origArgs) do&lt;br /&gt;
		v = v:match(&#039;^%s*(.-)%s*$&#039;)&lt;br /&gt;
		if v ~= &#039;&#039; then&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local modules = mTableTools.compressSparseArray(args)&lt;br /&gt;
	local box = p.renderBox(modules)&lt;br /&gt;
	local trackingCategories = p.renderTrackingCategories(args, modules)&lt;br /&gt;
	return box .. trackingCategories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderBox(modules)&lt;br /&gt;
	local boxArgs = {}&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		boxArgs.text = &#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: no modules specified&amp;lt;/strong&amp;gt;&#039;&lt;br /&gt;
	else&lt;br /&gt;
		local moduleLinks = {}&lt;br /&gt;
		for i, module in ipairs(modules) do&lt;br /&gt;
			moduleLinks[i] = string.format(&#039;[[:%s]]&#039;, module)&lt;br /&gt;
			local maybeSandbox = mw.title.new(module .. &#039;/sandbox&#039;)&lt;br /&gt;
			if maybeSandbox and maybeSandbox.exists then&lt;br /&gt;
				moduleLinks[i] = moduleLinks[i] .. string.format(&#039; ([[:%s|sandbox]])&#039;, maybeSandbox.fullText)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		local moduleList = mList.makeList(&#039;bulleted&#039;, moduleLinks)&lt;br /&gt;
		local title = mw.title.getCurrentTitle()&lt;br /&gt;
		if title.subpageText == &amp;quot;doc&amp;quot; then&lt;br /&gt;
			title = title.basePageTitle&lt;br /&gt;
		end&lt;br /&gt;
		if title.contentModel == &amp;quot;Scribunto&amp;quot; then&lt;br /&gt;
			boxArgs.text = &#039;This module depends on the following other modules:&#039; .. moduleList&lt;br /&gt;
		else&lt;br /&gt;
			boxArgs.text = &#039;This template  uses [[Wikipedia:Lua|Lua]]:\n&#039; .. moduleList&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	boxArgs.type = &#039;notice&#039;&lt;br /&gt;
	boxArgs.small = true&lt;br /&gt;
	boxArgs.image = &#039;&amp;lt;img src=&amp;quot;/wiki/Special:FilePath/Lua-Logo.png&amp;quot; width=&amp;quot;30&amp;quot; alt=&amp;quot;&amp;quot; /&amp;gt;&#039;&lt;br /&gt;
	return mMessageBox.main(&#039;mbox&#039;, boxArgs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderTrackingCategories(args, modules, titleObj)&lt;br /&gt;
	if yesno(args.nocat) then&lt;br /&gt;
		return &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local cats = {}&lt;br /&gt;
&lt;br /&gt;
	-- Error category&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		cats[#cats + 1] = &#039;Lua templates with errors&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Lua templates category&lt;br /&gt;
	titleObj = titleObj or mw.title.getCurrentTitle()&lt;br /&gt;
	local subpageBlacklist = {&lt;br /&gt;
		doc = true,&lt;br /&gt;
		sandbox = true,&lt;br /&gt;
		sandbox2 = true,&lt;br /&gt;
		testcases = true&lt;br /&gt;
	}&lt;br /&gt;
	if not subpageBlacklist[titleObj.subpageText] then&lt;br /&gt;
		local protCatName&lt;br /&gt;
		if titleObj.namespace == 10 then&lt;br /&gt;
			local category = args.category&lt;br /&gt;
			if not category then&lt;br /&gt;
				local categories = {&lt;br /&gt;
					[&#039;Module:String&#039;] = &#039;Templates based on the String Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Math&#039;] = &#039;Templates based on the Math Lua module&#039;,&lt;br /&gt;
					[&#039;Module:BaseConvert&#039;] = &#039;Templates based on the BaseConvert Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Citation/CS1&#039;] = &#039;Templates based on the Citation/CS1 Lua module&#039;&lt;br /&gt;
				}&lt;br /&gt;
				category = modules[1] and categories[modules[1]]&lt;br /&gt;
				category = category or &#039;Lua-based templates&#039;&lt;br /&gt;
			end	&lt;br /&gt;
			cats[#cats + 1] = category&lt;br /&gt;
			protCatName = &amp;quot;Templates using under-protected Lua modules&amp;quot;&lt;br /&gt;
		elseif titleObj.namespace == 828 then&lt;br /&gt;
			protCatName = &amp;quot;Modules depending on under-protected modules&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		if not args.noprotcat and protCatName then&lt;br /&gt;
			local protLevels = {&lt;br /&gt;
				autoconfirmed = 1,&lt;br /&gt;
				extendedconfirmed = 2,&lt;br /&gt;
				templateeditor = 3,&lt;br /&gt;
				sysop = 4&lt;br /&gt;
			}&lt;br /&gt;
			local currentProt&lt;br /&gt;
			if titleObj.id ~= 0 then&lt;br /&gt;
				-- id is 0 (page does not exist) if am previewing before creating a template.&lt;br /&gt;
				currentProt = titleObj.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
			end&lt;br /&gt;
			if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end&lt;br /&gt;
			for i, module in ipairs(modules) do&lt;br /&gt;
				if module ~= &amp;quot;WP:libraryUtil&amp;quot; then&lt;br /&gt;
					local moduleTitle = mw.title.new(module)&lt;br /&gt;
					local moduleProt = moduleTitle and moduleTitle.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
					if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end&lt;br /&gt;
					if moduleProt &amp;lt; currentProt then&lt;br /&gt;
						cats[#cats + 1] = protCatName&lt;br /&gt;
						break&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for i, cat in ipairs(cats) do&lt;br /&gt;
		cats[i] = string.format(&#039;[[Category:%s]]&#039;, cat)&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(cats)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6548</id>
		<title>Module:Lua banner</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6548"/>
		<updated>2025-08-11T19:45:37Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements the {{lua}} template.&lt;br /&gt;
local yesno = require(&#039;Module:Yesno&#039;)&lt;br /&gt;
local mList = require(&#039;Module:List&#039;)&lt;br /&gt;
local mTableTools = require(&#039;Module:TableTools&#039;)&lt;br /&gt;
local mMessageBox = require(&#039;Module:Message box&#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local origArgs = frame:getParent().args&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for k, v in pairs(origArgs) do&lt;br /&gt;
		v = v:match(&#039;^%s*(.-)%s*$&#039;)&lt;br /&gt;
		if v ~= &#039;&#039; then&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local modules = mTableTools.compressSparseArray(args)&lt;br /&gt;
	local box = p.renderBox(modules)&lt;br /&gt;
	local trackingCategories = p.renderTrackingCategories(args, modules)&lt;br /&gt;
	return box .. trackingCategories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderBox(modules)&lt;br /&gt;
	local boxArgs = {}&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		boxArgs.text = &#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: no modules specified&amp;lt;/strong&amp;gt;&#039;&lt;br /&gt;
	else&lt;br /&gt;
		local moduleLinks = {}&lt;br /&gt;
		for i, module in ipairs(modules) do&lt;br /&gt;
			moduleLinks[i] = string.format(&#039;[[:%s]]&#039;, module)&lt;br /&gt;
			local maybeSandbox = mw.title.new(module .. &#039;/sandbox&#039;)&lt;br /&gt;
			if maybeSandbox and maybeSandbox.exists then&lt;br /&gt;
				moduleLinks[i] = moduleLinks[i] .. string.format(&#039; ([[:%s|sandbox]])&#039;, maybeSandbox.fullText)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		local moduleList = mList.makeList(&#039;bulleted&#039;, moduleLinks)&lt;br /&gt;
		local title = mw.title.getCurrentTitle()&lt;br /&gt;
		if title.subpageText == &amp;quot;doc&amp;quot; then&lt;br /&gt;
			title = title.basePageTitle&lt;br /&gt;
		end&lt;br /&gt;
		if title.contentModel == &amp;quot;Scribunto&amp;quot; then&lt;br /&gt;
			boxArgs.text = &#039;This module depends on the following other modules:&#039; .. moduleList&lt;br /&gt;
		else&lt;br /&gt;
			boxArgs.text = &#039;This template  uses [[Wikipedia:Lua|Lua]]:\n&#039; .. moduleList&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	boxArgs.type = &#039;notice&#039;&lt;br /&gt;
	boxArgs.small = true&lt;br /&gt;
	boxArgs.image = &#039;Lua-Logo.png&#039;&lt;br /&gt;
	return mMessageBox.main(&#039;mbox&#039;, boxArgs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderTrackingCategories(args, modules, titleObj)&lt;br /&gt;
	if yesno(args.nocat) then&lt;br /&gt;
		return &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local cats = {}&lt;br /&gt;
&lt;br /&gt;
	-- Error category&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		cats[#cats + 1] = &#039;Lua templates with errors&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Lua templates category&lt;br /&gt;
	titleObj = titleObj or mw.title.getCurrentTitle()&lt;br /&gt;
	local subpageBlacklist = {&lt;br /&gt;
		doc = true,&lt;br /&gt;
		sandbox = true,&lt;br /&gt;
		sandbox2 = true,&lt;br /&gt;
		testcases = true&lt;br /&gt;
	}&lt;br /&gt;
	if not subpageBlacklist[titleObj.subpageText] then&lt;br /&gt;
		local protCatName&lt;br /&gt;
		if titleObj.namespace == 10 then&lt;br /&gt;
			local category = args.category&lt;br /&gt;
			if not category then&lt;br /&gt;
				local categories = {&lt;br /&gt;
					[&#039;Module:String&#039;] = &#039;Templates based on the String Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Math&#039;] = &#039;Templates based on the Math Lua module&#039;,&lt;br /&gt;
					[&#039;Module:BaseConvert&#039;] = &#039;Templates based on the BaseConvert Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Citation/CS1&#039;] = &#039;Templates based on the Citation/CS1 Lua module&#039;&lt;br /&gt;
				}&lt;br /&gt;
				category = modules[1] and categories[modules[1]]&lt;br /&gt;
				category = category or &#039;Lua-based templates&#039;&lt;br /&gt;
			end	&lt;br /&gt;
			cats[#cats + 1] = category&lt;br /&gt;
			protCatName = &amp;quot;Templates using under-protected Lua modules&amp;quot;&lt;br /&gt;
		elseif titleObj.namespace == 828 then&lt;br /&gt;
			protCatName = &amp;quot;Modules depending on under-protected modules&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		if not args.noprotcat and protCatName then&lt;br /&gt;
			local protLevels = {&lt;br /&gt;
				autoconfirmed = 1,&lt;br /&gt;
				extendedconfirmed = 2,&lt;br /&gt;
				templateeditor = 3,&lt;br /&gt;
				sysop = 4&lt;br /&gt;
			}&lt;br /&gt;
			local currentProt&lt;br /&gt;
			if titleObj.id ~= 0 then&lt;br /&gt;
				-- id is 0 (page does not exist) if am previewing before creating a template.&lt;br /&gt;
				currentProt = titleObj.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
			end&lt;br /&gt;
			if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end&lt;br /&gt;
			for i, module in ipairs(modules) do&lt;br /&gt;
				if module ~= &amp;quot;WP:libraryUtil&amp;quot; then&lt;br /&gt;
					local moduleTitle = mw.title.new(module)&lt;br /&gt;
					local moduleProt = moduleTitle and moduleTitle.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
					if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end&lt;br /&gt;
					if moduleProt &amp;lt; currentProt then&lt;br /&gt;
						cats[#cats + 1] = protCatName&lt;br /&gt;
						break&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for i, cat in ipairs(cats) do&lt;br /&gt;
		cats[i] = string.format(&#039;[[Category:%s]]&#039;, cat)&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(cats)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6547</id>
		<title>Module:Lua banner</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Lua_banner&amp;diff=6547"/>
		<updated>2025-08-11T19:40:12Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements the {{lua}} template.&lt;br /&gt;
local yesno = require(&#039;Module:Yesno&#039;)&lt;br /&gt;
local mList = require(&#039;Module:List&#039;)&lt;br /&gt;
local mTableTools = require(&#039;Module:TableTools&#039;)&lt;br /&gt;
local mMessageBox = require(&#039;Module:Message box&#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local origArgs = frame:getParent().args&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for k, v in pairs(origArgs) do&lt;br /&gt;
		v = v:match(&#039;^%s*(.-)%s*$&#039;)&lt;br /&gt;
		if v ~= &#039;&#039; then&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local modules = mTableTools.compressSparseArray(args)&lt;br /&gt;
	local box = p.renderBox(modules)&lt;br /&gt;
	local trackingCategories = p.renderTrackingCategories(args, modules)&lt;br /&gt;
	return box .. trackingCategories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderBox(modules)&lt;br /&gt;
	local boxArgs = {}&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		boxArgs.text = &#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: no modules specified&amp;lt;/strong&amp;gt;&#039;&lt;br /&gt;
	else&lt;br /&gt;
		local moduleLinks = {}&lt;br /&gt;
		for i, module in ipairs(modules) do&lt;br /&gt;
			moduleLinks[i] = string.format(&#039;[[:%s]]&#039;, module)&lt;br /&gt;
			local maybeSandbox = mw.title.new(module .. &#039;/sandbox&#039;)&lt;br /&gt;
			if maybeSandbox and maybeSandbox.exists then&lt;br /&gt;
				moduleLinks[i] = moduleLinks[i] .. string.format(&#039; ([[:%s|sandbox]])&#039;, maybeSandbox.fullText)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		local moduleList = mList.makeList(&#039;bulleted&#039;, moduleLinks)&lt;br /&gt;
		local title = mw.title.getCurrentTitle()&lt;br /&gt;
		if title.subpageText == &amp;quot;doc&amp;quot; then&lt;br /&gt;
			title = title.basePageTitle&lt;br /&gt;
		end&lt;br /&gt;
		if title.contentModel == &amp;quot;Scribunto&amp;quot; then&lt;br /&gt;
			boxArgs.text = &#039;This module depends on the following other modules:&#039; .. moduleList&lt;br /&gt;
		else&lt;br /&gt;
			boxArgs.text = &#039;This template  uses [[Wikipedia:Lua|Lua]]:\n&#039; .. moduleList&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	boxArgs.type = &#039;notice&#039;&lt;br /&gt;
	boxArgs.small = true&lt;br /&gt;
	boxArgs.image = &#039;[[File:Lua-Logo.png|30px|alt=|link=]]&#039;&lt;br /&gt;
	return mMessageBox.main(&#039;mbox&#039;, boxArgs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderTrackingCategories(args, modules, titleObj)&lt;br /&gt;
	if yesno(args.nocat) then&lt;br /&gt;
		return &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local cats = {}&lt;br /&gt;
&lt;br /&gt;
	-- Error category&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		cats[#cats + 1] = &#039;Lua templates with errors&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Lua templates category&lt;br /&gt;
	titleObj = titleObj or mw.title.getCurrentTitle()&lt;br /&gt;
	local subpageBlacklist = {&lt;br /&gt;
		doc = true,&lt;br /&gt;
		sandbox = true,&lt;br /&gt;
		sandbox2 = true,&lt;br /&gt;
		testcases = true&lt;br /&gt;
	}&lt;br /&gt;
	if not subpageBlacklist[titleObj.subpageText] then&lt;br /&gt;
		local protCatName&lt;br /&gt;
		if titleObj.namespace == 10 then&lt;br /&gt;
			local category = args.category&lt;br /&gt;
			if not category then&lt;br /&gt;
				local categories = {&lt;br /&gt;
					[&#039;Module:String&#039;] = &#039;Templates based on the String Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Math&#039;] = &#039;Templates based on the Math Lua module&#039;,&lt;br /&gt;
					[&#039;Module:BaseConvert&#039;] = &#039;Templates based on the BaseConvert Lua module&#039;,&lt;br /&gt;
					[&#039;Module:Citation/CS1&#039;] = &#039;Templates based on the Citation/CS1 Lua module&#039;&lt;br /&gt;
				}&lt;br /&gt;
				category = modules[1] and categories[modules[1]]&lt;br /&gt;
				category = category or &#039;Lua-based templates&#039;&lt;br /&gt;
			end	&lt;br /&gt;
			cats[#cats + 1] = category&lt;br /&gt;
			protCatName = &amp;quot;Templates using under-protected Lua modules&amp;quot;&lt;br /&gt;
		elseif titleObj.namespace == 828 then&lt;br /&gt;
			protCatName = &amp;quot;Modules depending on under-protected modules&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		if not args.noprotcat and protCatName then&lt;br /&gt;
			local protLevels = {&lt;br /&gt;
				autoconfirmed = 1,&lt;br /&gt;
				extendedconfirmed = 2,&lt;br /&gt;
				templateeditor = 3,&lt;br /&gt;
				sysop = 4&lt;br /&gt;
			}&lt;br /&gt;
			local currentProt&lt;br /&gt;
			if titleObj.id ~= 0 then&lt;br /&gt;
				-- id is 0 (page does not exist) if am previewing before creating a template.&lt;br /&gt;
				currentProt = titleObj.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
			end&lt;br /&gt;
			if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end&lt;br /&gt;
			for i, module in ipairs(modules) do&lt;br /&gt;
				if module ~= &amp;quot;WP:libraryUtil&amp;quot; then&lt;br /&gt;
					local moduleTitle = mw.title.new(module)&lt;br /&gt;
					local moduleProt = moduleTitle and moduleTitle.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
					if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end&lt;br /&gt;
					if moduleProt &amp;lt; currentProt then&lt;br /&gt;
						cats[#cats + 1] = protCatName&lt;br /&gt;
						break&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for i, cat in ipairs(cats) do&lt;br /&gt;
		cats[i] = string.format(&#039;[[Category:%s]]&#039;, cat)&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(cats)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Category:Images_imported_from_Wikipedia&amp;diff=6546</id>
		<title>Category:Images imported from Wikipedia</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Category:Images_imported_from_Wikipedia&amp;diff=6546"/>
		<updated>2025-08-11T19:37:45Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;Category:Images Category:Page accreditations&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Images]] [[Category:Page accreditations]]&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=File:Lua-Logo.png&amp;diff=6545</id>
		<title>File:Lua-Logo.png</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=File:Lua-Logo.png&amp;diff=6545"/>
		<updated>2025-08-11T19:37:28Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: https://foundation.wikimedia.org/wiki/File:Lua-Logo.svg

Category:Images imported from Wikipedia&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
https://foundation.wikimedia.org/wiki/File:Lua-Logo.svg&lt;br /&gt;
&lt;br /&gt;
[[Category:Images imported from Wikipedia]]&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Message_box/ombox.css&amp;diff=6544</id>
		<title>Module:Message box/ombox.css</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Message_box/ombox.css&amp;diff=6544"/>
		<updated>2025-08-11T19:28:02Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Imported from Wikipedia.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* {{pp|small=y}} */&lt;br /&gt;
.ombox {&lt;br /&gt;
	margin: 4px 0;&lt;br /&gt;
	border-collapse: collapse;&lt;br /&gt;
	border: 1px solid #a2a9b1;    /* Default &amp;quot;notice&amp;quot; gray */&lt;br /&gt;
    background-color: #f8f9fa;    /* fallback for older MediaWiki */&lt;br /&gt;
/*  background-color: var(--background-color-neutral-subtle); */&lt;br /&gt;
	box-sizing: border-box;&lt;br /&gt;
    color: #202122;               /* fallback for older MediaWiki */&lt;br /&gt;
/*  color: var(--color-base, #202122); */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* For the &amp;quot;small=yes&amp;quot; option. */&lt;br /&gt;
.ombox.mbox-small {&lt;br /&gt;
	font-size: 88%;&lt;br /&gt;
	line-height: 1.25em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.ombox-speedy {&lt;br /&gt;
	border: 2px solid #b32424;    /* Red */&lt;br /&gt;
	background-color: #fee7e6;    /* Pink */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.ombox-delete {&lt;br /&gt;
	border: 2px solid #b32424;    /* Red */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.ombox-content {&lt;br /&gt;
	border: 1px solid #f28500;    /* Orange */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.ombox-style {&lt;br /&gt;
	border: 1px solid #fc3;       /* Yellow */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.ombox-move {&lt;br /&gt;
	border: 1px solid #9932cc;    /* Purple */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.ombox-protection {&lt;br /&gt;
	border: 2px solid #a2a9b1;    /* Gray-gold */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.ombox .mbox-text {&lt;br /&gt;
	border: none;&lt;br /&gt;
	/* @noflip */&lt;br /&gt;
	padding: 0.25em 0.9em;&lt;br /&gt;
	width: 100%;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.ombox .mbox-image {&lt;br /&gt;
	border: none;&lt;br /&gt;
	/* @noflip */&lt;br /&gt;
	padding: 2px 0 2px 0.9em;&lt;br /&gt;
	text-align: center;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.ombox .mbox-imageright {&lt;br /&gt;
	border: none;&lt;br /&gt;
	/* @noflip */&lt;br /&gt;
	padding: 2px 0.9em 2px 0;&lt;br /&gt;
	text-align: center;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* An empty narrow cell */&lt;br /&gt;
.ombox .mbox-empty-cell {&lt;br /&gt;
	border: none;&lt;br /&gt;
	padding: 0;&lt;br /&gt;
	width: 1px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.ombox .mbox-invalid-type {&lt;br /&gt;
	text-align: center;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
@media (min-width: 720px) {&lt;br /&gt;
	.ombox {&lt;br /&gt;
		margin: 4px 10%;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	.ombox.mbox-small {&lt;br /&gt;
		/* @noflip */&lt;br /&gt;
		clear: right;&lt;br /&gt;
		/* @noflip */&lt;br /&gt;
		float: right;&lt;br /&gt;
		/* @noflip */&lt;br /&gt;
		margin: 4px 0 4px 1em;&lt;br /&gt;
		width: 238px;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/** T367463 */&lt;br /&gt;
body.skin--responsive table.ombox img {&lt;br /&gt;
	max-width: none !important;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
@media screen {&lt;br /&gt;
	html.skin-theme-clientpref-night .ombox-speedy {&lt;br /&gt;
		background-color: #310402;    /* Dark red, same hue/saturation as light */&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Currently unsupported on Isekai.wiki&lt;br /&gt;
@media screen and (prefers-color-scheme: dark) {&lt;br /&gt;
	html.skin-theme-clientpref-os .ombox-speedy {&lt;br /&gt;
		background-color: #310402;  //Dark red, same hue/saturation as light&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
*/&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Message_box/configuration/doc&amp;diff=6543</id>
		<title>Module:Message box/configuration/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Message_box/configuration/doc&amp;diff=6543"/>
		<updated>2025-08-11T19:10:30Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Configuration for [[Module:Message box]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&amp;lt;!-- MODULE CATEGORY --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;!-- MODULE DOCUMENTATION CATEGORIES --&amp;gt;&lt;br /&gt;
[[Category:Module documentation subpages imported from Wikipedia]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Message_box/configuration/doc&amp;diff=6542</id>
		<title>Module:Message box/configuration/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Message_box/configuration/doc&amp;diff=6542"/>
		<updated>2025-08-11T19:09:53Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;Configuration for Module:Message box.  &amp;lt;includeonly&amp;gt;{{Sandbox other|| &amp;lt;!-- MODULE CATEGORY --&amp;gt;  }}&amp;lt;/includeonly&amp;gt;  &amp;lt;noinclude&amp;gt; &amp;lt;!-- MODULE DOCUMENTATION CATEGORIES --&amp;gt; Category:Module documentation subpages imported from Wikipedia &amp;lt;/noinclude&amp;gt;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Configuration for [[Module:Message box]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- MODULE CATEGORY --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;!-- MODULE DOCUMENTATION CATEGORIES --&amp;gt;&lt;br /&gt;
[[Category:Module documentation subpages imported from Wikipedia]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Message_box/configuration&amp;diff=6541</id>
		<title>Module:Message box/configuration</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Message_box/configuration&amp;diff=6541"/>
		<updated>2025-08-11T19:05:42Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Imported from Wikipedia.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--------------------------------------------------------------------------------&lt;br /&gt;
--                          Message box configuration                         --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- This module contains configuration data for [[Module:Message box]].        --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
return {&lt;br /&gt;
	ambox = {&lt;br /&gt;
		types = {&lt;br /&gt;
			speedy = {&lt;br /&gt;
				class = &#039;ambox-speedy&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			delete = {&lt;br /&gt;
				class = &#039;ambox-delete&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			content = {&lt;br /&gt;
				class = &#039;ambox-content&#039;,&lt;br /&gt;
				image = &#039;Ambox important.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			style = {&lt;br /&gt;
				class = &#039;ambox-style&#039;,&lt;br /&gt;
				image = &#039;Edit-clear.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			move = {&lt;br /&gt;
				class = &#039;ambox-move&#039;,&lt;br /&gt;
				image = &#039;Merge-split-transwiki default.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			protection = {&lt;br /&gt;
				class = &#039;ambox-protection&#039;,&lt;br /&gt;
				image = &#039;Semi-protection-shackle-keyhole.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			notice = {&lt;br /&gt;
				class = &#039;ambox-notice&#039;,&lt;br /&gt;
				image = &#039;Information icon4.svg&#039;&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default                     = &#039;notice&#039;,&lt;br /&gt;
		allowBlankParams            = {&#039;talk&#039;, &#039;sect&#039;, &#039;date&#039;, &#039;issue&#039;, &#039;fix&#039;, &#039;subst&#039;, &#039;hidden&#039;},&lt;br /&gt;
		allowSmall                  = true,&lt;br /&gt;
		smallParam                  = &#039;left&#039;,&lt;br /&gt;
		smallClass                  = &#039;mbox-small-left&#039;,&lt;br /&gt;
		substCheck                  = true,&lt;br /&gt;
		classes                     = {&#039;metadata&#039;, &#039;ambox&#039;},&lt;br /&gt;
		imageEmptyCell              = true,&lt;br /&gt;
		imageCheckBlank             = true,&lt;br /&gt;
		imageSmallSize              = &#039;20x20px&#039;,&lt;br /&gt;
		imageCellDiv                = true,&lt;br /&gt;
		useCollapsibleTextFields    = true,&lt;br /&gt;
		imageRightNone              = true,&lt;br /&gt;
		sectionDefault              = &#039;article&#039;,&lt;br /&gt;
		allowMainspaceCategories    = true,&lt;br /&gt;
		templateCategory            = &#039;Article message templates&#039;,&lt;br /&gt;
	        templateCategoryRequireName = true,&lt;br /&gt;
		templateErrorCategory       = &#039;Article message templates with missing parameters&#039;,&lt;br /&gt;
		templateErrorParamsToCheck  = {&#039;issue&#039;, &#039;fix&#039;, &#039;subst&#039;},&lt;br /&gt;
		removalNotice               = &#039;&amp;lt;small&amp;gt;[[Help:Maintenance template removal|Learn how and when to remove this message]]&amp;lt;/small&amp;gt;&#039;,&lt;br /&gt;
		templatestyles              = &#039;Module:Message box/ambox.css&#039;&lt;br /&gt;
	},&lt;br /&gt;
	&lt;br /&gt;
	cmbox = {&lt;br /&gt;
		types = {&lt;br /&gt;
			speedy = {&lt;br /&gt;
				class = &#039;cmbox-speedy&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			delete = {&lt;br /&gt;
				class = &#039;cmbox-delete&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			content = {&lt;br /&gt;
				class = &#039;cmbox-content&#039;,&lt;br /&gt;
				image = &#039;Ambox important.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			style = {&lt;br /&gt;
				class = &#039;cmbox-style&#039;,&lt;br /&gt;
				image = &#039;Edit-clear.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			move = {&lt;br /&gt;
				class = &#039;cmbox-move&#039;,&lt;br /&gt;
				image = &#039;Merge-split-transwiki default.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			protection = {&lt;br /&gt;
				class = &#039;cmbox-protection&#039;,&lt;br /&gt;
				image = &#039;Semi-protection-shackle-keyhole.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			notice = {&lt;br /&gt;
				class = &#039;cmbox-notice&#039;,&lt;br /&gt;
				image = &#039;Information icon4.svg&#039;&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default              = &#039;notice&#039;,&lt;br /&gt;
		showInvalidTypeError = true,&lt;br /&gt;
		classes              = {&#039;cmbox&#039;},&lt;br /&gt;
		imageEmptyCell       = true,&lt;br /&gt;
		templatestyles       = &#039;Module:Message box/cmbox.css&#039;&lt;br /&gt;
	},&lt;br /&gt;
	&lt;br /&gt;
	fmbox = {&lt;br /&gt;
		types = {&lt;br /&gt;
			warning = {&lt;br /&gt;
				class = &#039;fmbox-warning&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			editnotice = {&lt;br /&gt;
				class = &#039;fmbox-editnotice&#039;,&lt;br /&gt;
				image = &#039;Information icon4.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			system = {&lt;br /&gt;
				class = &#039;fmbox-system&#039;,&lt;br /&gt;
				image = &#039;Information icon4.svg&#039;&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default              = &#039;system&#039;,&lt;br /&gt;
		showInvalidTypeError = true,&lt;br /&gt;
		classes              = {&#039;fmbox&#039;},&lt;br /&gt;
		imageEmptyCell       = false,&lt;br /&gt;
		imageRightNone       = false,&lt;br /&gt;
		templatestyles       = &#039;Module:Message box/fmbox.css&#039;&lt;br /&gt;
	},&lt;br /&gt;
	&lt;br /&gt;
	imbox = {&lt;br /&gt;
		types = {&lt;br /&gt;
			speedy = {&lt;br /&gt;
				class = &#039;imbox-speedy&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			delete = {&lt;br /&gt;
				class = &#039;imbox-delete&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			content = {&lt;br /&gt;
				class = &#039;imbox-content&#039;,&lt;br /&gt;
				image = &#039;Ambox important.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			style = {&lt;br /&gt;
				class = &#039;imbox-style&#039;,&lt;br /&gt;
				image = &#039;Edit-clear.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			move = {&lt;br /&gt;
				class = &#039;imbox-move&#039;,&lt;br /&gt;
				image = &#039;Merge-split-transwiki default.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			protection = {&lt;br /&gt;
				class = &#039;imbox-protection&#039;,&lt;br /&gt;
				image = &#039;Semi-protection-shackle-keyhole.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			license = {&lt;br /&gt;
				class = &#039;imbox-license licensetpl&#039;,&lt;br /&gt;
				image = &#039;Imbox-license.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			[&amp;quot;license-related&amp;quot;] = {&lt;br /&gt;
				class = &#039;imbox-license&#039;,&lt;br /&gt;
				image = &#039;Imbox-license.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			featured = {&lt;br /&gt;
				class = &#039;imbox-featured&#039;,&lt;br /&gt;
				image = &#039;Cscr-featured.svg&#039;,&lt;br /&gt;
				imageNeedsLink = true&lt;br /&gt;
			},&lt;br /&gt;
			notice = {&lt;br /&gt;
				class = &#039;imbox-notice&#039;,&lt;br /&gt;
				image = &#039;Information icon4.svg&#039;&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default              = &#039;notice&#039;,&lt;br /&gt;
		showInvalidTypeError = true,&lt;br /&gt;
		classes              = {&#039;imbox&#039;},&lt;br /&gt;
		imageEmptyCell       = true,&lt;br /&gt;
		below                = true,&lt;br /&gt;
		templateCategory     = &#039;File message boxes&#039;,&lt;br /&gt;
		templatestyles       = &#039;Module:Message box/imbox.css&#039;&lt;br /&gt;
	},&lt;br /&gt;
	&lt;br /&gt;
	ombox = {&lt;br /&gt;
		types = {&lt;br /&gt;
			speedy = {&lt;br /&gt;
				class = &#039;ombox-speedy&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			delete = {&lt;br /&gt;
				class = &#039;ombox-delete&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			content = {&lt;br /&gt;
				class = &#039;ombox-content&#039;,&lt;br /&gt;
				image = &#039;Ambox important.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			style = {&lt;br /&gt;
				class = &#039;ombox-style&#039;,&lt;br /&gt;
				image = &#039;Edit-clear.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			move = {&lt;br /&gt;
				class = &#039;ombox-move&#039;,&lt;br /&gt;
				image = &#039;Merge-split-transwiki default.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			protection = {&lt;br /&gt;
				class = &#039;ombox-protection&#039;,&lt;br /&gt;
				image = &#039;Semi-protection-shackle-keyhole.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			notice = {&lt;br /&gt;
				class = &#039;ombox-notice&#039;,&lt;br /&gt;
				image = &#039;Information icon4.svg&#039;&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default              = &#039;notice&#039;,&lt;br /&gt;
		showInvalidTypeError = true,&lt;br /&gt;
		classes              = {&#039;ombox&#039;},&lt;br /&gt;
		allowSmall           = true,&lt;br /&gt;
		imageEmptyCell       = true,&lt;br /&gt;
		imageRightNone       = true,&lt;br /&gt;
		templatestyles       = &#039;Module:Message box/ombox.css&#039;&lt;br /&gt;
	},&lt;br /&gt;
	&lt;br /&gt;
	tmbox = {&lt;br /&gt;
		types = {&lt;br /&gt;
			speedy = {&lt;br /&gt;
				class = &#039;tmbox-speedy&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			delete = {&lt;br /&gt;
				class = &#039;tmbox-delete&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			content = {&lt;br /&gt;
				class = &#039;tmbox-content&#039;,&lt;br /&gt;
				image = &#039;Ambox important.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			style = {&lt;br /&gt;
				class = &#039;tmbox-style&#039;,&lt;br /&gt;
				image = &#039;Edit-clear.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			move = {&lt;br /&gt;
				class = &#039;tmbox-move&#039;,&lt;br /&gt;
				image = &#039;Merge-split-transwiki default.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			protection = {&lt;br /&gt;
				class = &#039;tmbox-protection&#039;,&lt;br /&gt;
				image = &#039;Semi-protection-shackle-keyhole.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			notice = {&lt;br /&gt;
				class = &#039;tmbox-notice&#039;,&lt;br /&gt;
				image = &#039;Information icon4.svg&#039;&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default              = &#039;notice&#039;,&lt;br /&gt;
		showInvalidTypeError = true,&lt;br /&gt;
		classes              = {&#039;tmbox&#039;},&lt;br /&gt;
		allowSmall           = true,&lt;br /&gt;
		imageRightNone       = true,&lt;br /&gt;
		imageEmptyCell       = true,&lt;br /&gt;
		templateCategory     = &#039;Talk message boxes&#039;,&lt;br /&gt;
		templatestyles       = &#039;Module:Message box/tmbox.css&#039;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:TableTools&amp;diff=6530</id>
		<title>Module:TableTools</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:TableTools&amp;diff=6530"/>
		<updated>2025-07-31T20:12:10Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;------------------------------------------------------------------------------------&lt;br /&gt;
--                                   TableTools                                   --&lt;br /&gt;
--                                                                                --&lt;br /&gt;
-- This module includes a number of functions for dealing with Lua tables.        --&lt;br /&gt;
-- It is a meta-module, meant to be called from other Lua modules, and should not --&lt;br /&gt;
-- be called directly from #invoke.                                               --&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local libraryUtil = require(&#039;libraryUtil&#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Define often-used variables and functions.&lt;br /&gt;
local floor = math.floor&lt;br /&gt;
local infinity = math.huge&lt;br /&gt;
local checkType = libraryUtil.checkType&lt;br /&gt;
local checkTypeMulti = libraryUtil.checkTypeMulti&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- isPositiveInteger&lt;br /&gt;
--&lt;br /&gt;
-- This function returns true if the given value is a positive integer, and false&lt;br /&gt;
-- if not. Although it doesn&#039;t operate on tables, it is included here as it is&lt;br /&gt;
-- useful for determining whether a given table key is in the array part or the&lt;br /&gt;
-- hash part of a table.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.isPositiveInteger(v)&lt;br /&gt;
	return type(v) == &#039;number&#039; and v &amp;gt;= 1 and floor(v) == v and v &amp;lt; infinity&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- isNan&lt;br /&gt;
--&lt;br /&gt;
-- This function returns true if the given number is a NaN value, and false if&lt;br /&gt;
-- not. Although it doesn&#039;t operate on tables, it is included here as it is useful&lt;br /&gt;
-- for determining whether a value can be a valid table key. Lua will generate an&lt;br /&gt;
-- error if a NaN is used as a table key.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.isNan(v)&lt;br /&gt;
	return type(v) == &#039;number&#039; and v ~= v&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- shallowClone&lt;br /&gt;
--&lt;br /&gt;
-- This returns a clone of a table. The value returned is a new table, but all&lt;br /&gt;
-- subtables and functions are shared. Metamethods are respected, but the returned&lt;br /&gt;
-- table will have no metatable of its own.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.shallowClone(t)&lt;br /&gt;
	checkType(&#039;shallowClone&#039;, 1, t, &#039;table&#039;)&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	for k, v in pairs(t) do&lt;br /&gt;
		ret[k] = v&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- removeDuplicates&lt;br /&gt;
--&lt;br /&gt;
-- This removes duplicate values from an array. Non-positive-integer keys are&lt;br /&gt;
-- ignored. The earliest value is kept, and all subsequent duplicate values are&lt;br /&gt;
-- removed, but otherwise the array order is unchanged.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.removeDuplicates(arr)&lt;br /&gt;
	checkType(&#039;removeDuplicates&#039;, 1, arr, &#039;table&#039;)&lt;br /&gt;
	local isNan = p.isNan&lt;br /&gt;
	local ret, exists = {}, {}&lt;br /&gt;
	for _, v in ipairs(arr) do&lt;br /&gt;
		if isNan(v) then&lt;br /&gt;
			-- NaNs can&#039;t be table keys, and they are also unique, so we don&#039;t need to check existence.&lt;br /&gt;
			ret[#ret + 1] = v&lt;br /&gt;
		elseif not exists[v] then&lt;br /&gt;
			ret[#ret + 1] = v&lt;br /&gt;
			exists[v] = true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- numKeys&lt;br /&gt;
--&lt;br /&gt;
-- This takes a table and returns an array containing the numbers of any numerical&lt;br /&gt;
-- keys that have non-nil values, sorted in numerical order.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.numKeys(t)&lt;br /&gt;
	checkType(&#039;numKeys&#039;, 1, t, &#039;table&#039;)&lt;br /&gt;
	local isPositiveInteger = p.isPositiveInteger&lt;br /&gt;
	local nums = {}&lt;br /&gt;
	for k in pairs(t) do&lt;br /&gt;
		if isPositiveInteger(k) then&lt;br /&gt;
			nums[#nums + 1] = k&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(nums)&lt;br /&gt;
	return nums&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- affixNums&lt;br /&gt;
--&lt;br /&gt;
-- This takes a table and returns an array containing the numbers of keys with the&lt;br /&gt;
-- specified prefix and suffix. For example, for the table&lt;br /&gt;
-- {a1 = &#039;foo&#039;, a3 = &#039;bar&#039;, a6 = &#039;baz&#039;} and the prefix &amp;quot;a&amp;quot;, affixNums will return&lt;br /&gt;
-- {1, 3, 6}.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.affixNums(t, prefix, suffix)&lt;br /&gt;
	checkType(&#039;affixNums&#039;, 1, t, &#039;table&#039;)&lt;br /&gt;
	checkType(&#039;affixNums&#039;, 2, prefix, &#039;string&#039;, true)&lt;br /&gt;
	checkType(&#039;affixNums&#039;, 3, suffix, &#039;string&#039;, true)&lt;br /&gt;
&lt;br /&gt;
	local function cleanPattern(s)&lt;br /&gt;
		-- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally.&lt;br /&gt;
		return s:gsub(&#039;([%(%)%%%.%[%]%*%+%-%?%^%$])&#039;, &#039;%%%1&#039;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	prefix = prefix or &#039;&#039;&lt;br /&gt;
	suffix = suffix or &#039;&#039;&lt;br /&gt;
	prefix = cleanPattern(prefix)&lt;br /&gt;
	suffix = cleanPattern(suffix)&lt;br /&gt;
	local pattern = &#039;^&#039; .. prefix .. &#039;([1-9]%d*)&#039; .. suffix .. &#039;$&#039;&lt;br /&gt;
&lt;br /&gt;
	local nums = {}&lt;br /&gt;
	for k in pairs(t) do&lt;br /&gt;
		if type(k) == &#039;string&#039; then&lt;br /&gt;
			local num = mw.ustring.match(k, pattern)&lt;br /&gt;
			if num then&lt;br /&gt;
				nums[#nums + 1] = tonumber(num)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(nums)&lt;br /&gt;
	return nums&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- numData&lt;br /&gt;
--&lt;br /&gt;
-- Given a table with keys like {&amp;quot;foo1&amp;quot;, &amp;quot;bar1&amp;quot;, &amp;quot;foo2&amp;quot;, &amp;quot;baz2&amp;quot;}, returns a table&lt;br /&gt;
-- of subtables in the format&lt;br /&gt;
-- {[1] = {foo = &#039;text&#039;, bar = &#039;text&#039;}, [2] = {foo = &#039;text&#039;, baz = &#039;text&#039;}}.&lt;br /&gt;
-- Keys that don&#039;t end with an integer are stored in a subtable named &amp;quot;other&amp;quot;. The&lt;br /&gt;
-- compress option compresses the table so that it can be iterated over with&lt;br /&gt;
-- ipairs.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.numData(t, compress)&lt;br /&gt;
	checkType(&#039;numData&#039;, 1, t, &#039;table&#039;)&lt;br /&gt;
	checkType(&#039;numData&#039;, 2, compress, &#039;boolean&#039;, true)&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	for k, v in pairs(t) do&lt;br /&gt;
		local prefix, num = mw.ustring.match(tostring(k), &#039;^([^0-9]*)([1-9][0-9]*)$&#039;)&lt;br /&gt;
		if num then&lt;br /&gt;
			num = tonumber(num)&lt;br /&gt;
			local subtable = ret[num] or {}&lt;br /&gt;
			if prefix == &#039;&#039; then&lt;br /&gt;
				-- Positional parameters match the blank string; put them at the start of the subtable instead.&lt;br /&gt;
				prefix = 1&lt;br /&gt;
			end&lt;br /&gt;
			subtable[prefix] = v&lt;br /&gt;
			ret[num] = subtable&lt;br /&gt;
		else&lt;br /&gt;
			local subtable = ret.other or {}&lt;br /&gt;
			subtable[k] = v&lt;br /&gt;
			ret.other = subtable&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if compress then&lt;br /&gt;
		local other = ret.other&lt;br /&gt;
		ret = p.compressSparseArray(ret)&lt;br /&gt;
		ret.other = other&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- compressSparseArray&lt;br /&gt;
--&lt;br /&gt;
-- This takes an array with one or more nil values, and removes the nil values&lt;br /&gt;
-- while preserving the order, so that the array can be safely traversed with&lt;br /&gt;
-- ipairs.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.compressSparseArray(t)&lt;br /&gt;
	checkType(&#039;compressSparseArray&#039;, 1, t, &#039;table&#039;)&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local nums = p.numKeys(t)&lt;br /&gt;
	for _, num in ipairs(nums) do&lt;br /&gt;
		ret[#ret + 1] = t[num]&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- sparseIpairs&lt;br /&gt;
--&lt;br /&gt;
-- This is an iterator for sparse arrays. It can be used like ipairs, but can&lt;br /&gt;
-- handle nil values.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.sparseIpairs(t)&lt;br /&gt;
	checkType(&#039;sparseIpairs&#039;, 1, t, &#039;table&#039;)&lt;br /&gt;
	local nums = p.numKeys(t)&lt;br /&gt;
	local i = 0&lt;br /&gt;
	local lim = #nums&lt;br /&gt;
	return function ()&lt;br /&gt;
		i = i + 1&lt;br /&gt;
		if i &amp;lt;= lim then&lt;br /&gt;
			local key = nums[i]&lt;br /&gt;
			return key, t[key]&lt;br /&gt;
		else&lt;br /&gt;
			return nil, nil&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- size&lt;br /&gt;
--&lt;br /&gt;
-- This returns the size of a key/value pair table. It will also work on arrays,&lt;br /&gt;
-- but for arrays it is more efficient to use the # operator.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.size(t)&lt;br /&gt;
	checkType(&#039;size&#039;, 1, t, &#039;table&#039;)&lt;br /&gt;
	local i = 0&lt;br /&gt;
	for _ in pairs(t) do&lt;br /&gt;
		i = i + 1&lt;br /&gt;
	end&lt;br /&gt;
	return i&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function defaultKeySort(item1, item2)&lt;br /&gt;
	-- &amp;quot;number&amp;quot; &amp;lt; &amp;quot;string&amp;quot;, so numbers will be sorted before strings.&lt;br /&gt;
	local type1, type2 = type(item1), type(item2)&lt;br /&gt;
	if type1 ~= type2 then&lt;br /&gt;
		return type1 &amp;lt; type2&lt;br /&gt;
	elseif type1 == &#039;table&#039; or type1 == &#039;boolean&#039; or type1 == &#039;function&#039; then&lt;br /&gt;
		return tostring(item1) &amp;lt; tostring(item2)&lt;br /&gt;
	else&lt;br /&gt;
		return item1 &amp;lt; item2&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- keysToList&lt;br /&gt;
--&lt;br /&gt;
-- Returns an array of the keys in a table, sorted using either a default&lt;br /&gt;
-- comparison function or a custom keySort function.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.keysToList(t, keySort, checked)&lt;br /&gt;
	if not checked then&lt;br /&gt;
		checkType(&#039;keysToList&#039;, 1, t, &#039;table&#039;)&lt;br /&gt;
		checkTypeMulti(&#039;keysToList&#039;, 2, keySort, {&#039;function&#039;, &#039;boolean&#039;, &#039;nil&#039;})&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local arr = {}&lt;br /&gt;
	local index = 1&lt;br /&gt;
	for k in pairs(t) do&lt;br /&gt;
		arr[index] = k&lt;br /&gt;
		index = index + 1&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if keySort ~= false then&lt;br /&gt;
		keySort = type(keySort) == &#039;function&#039; and keySort or defaultKeySort&lt;br /&gt;
		table.sort(arr, keySort)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return arr&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- sortedPairs&lt;br /&gt;
--&lt;br /&gt;
-- Iterates through a table, with the keys sorted using the keysToList function.&lt;br /&gt;
-- If there are only numerical keys, sparseIpairs is probably more efficient.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.sortedPairs(t, keySort)&lt;br /&gt;
	checkType(&#039;sortedPairs&#039;, 1, t, &#039;table&#039;)&lt;br /&gt;
	checkType(&#039;sortedPairs&#039;, 2, keySort, &#039;function&#039;, true)&lt;br /&gt;
&lt;br /&gt;
	local arr = p.keysToList(t, keySort, true)&lt;br /&gt;
&lt;br /&gt;
	local i = 0&lt;br /&gt;
	return function ()&lt;br /&gt;
		i = i + 1&lt;br /&gt;
		local key = arr[i]&lt;br /&gt;
		if key ~= nil then&lt;br /&gt;
			return key, t[key]&lt;br /&gt;
		else&lt;br /&gt;
			return nil, nil&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- isArray&lt;br /&gt;
--&lt;br /&gt;
-- Returns true if the given value is a table and all keys are consecutive&lt;br /&gt;
-- integers starting at 1.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.isArray(v)&lt;br /&gt;
	if type(v) ~= &#039;table&#039; then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	local i = 0&lt;br /&gt;
	for _ in pairs(v) do&lt;br /&gt;
		i = i + 1&lt;br /&gt;
		if v[i] == nil then&lt;br /&gt;
			return false&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return true&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- isArrayLike&lt;br /&gt;
--&lt;br /&gt;
-- Returns true if the given value is iterable and all keys are consecutive&lt;br /&gt;
-- integers starting at 1.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.isArrayLike(v)&lt;br /&gt;
	if not pcall(pairs, v) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	local i = 0&lt;br /&gt;
	for _ in pairs(v) do&lt;br /&gt;
		i = i + 1&lt;br /&gt;
		if v[i] == nil then&lt;br /&gt;
			return false&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return true&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- invert&lt;br /&gt;
--&lt;br /&gt;
-- Transposes the keys and values in an array. For example, {&amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;} -&amp;gt;&lt;br /&gt;
-- {a = 1, b = 2, c = 3}. Duplicates are not supported (result values refer to&lt;br /&gt;
-- the index of the last duplicate) and NaN values are ignored.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.invert(arr)&lt;br /&gt;
	checkType(&amp;quot;invert&amp;quot;, 1, arr, &amp;quot;table&amp;quot;)&lt;br /&gt;
	local isNan = p.isNan&lt;br /&gt;
	local map = {}&lt;br /&gt;
	for i, v in ipairs(arr) do&lt;br /&gt;
		if not isNan(v) then&lt;br /&gt;
			map[v] = i&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return map&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- listToSet&lt;br /&gt;
--&lt;br /&gt;
-- Creates a set from the array part of the table. Indexing the set by any of the&lt;br /&gt;
-- values of the array returns true. For example, {&amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;} -&amp;gt;&lt;br /&gt;
-- {a = true, b = true, c = true}. NaN values are ignored as Lua considers them&lt;br /&gt;
-- never equal to any value (including other NaNs or even themselves).&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.listToSet(arr)&lt;br /&gt;
	checkType(&amp;quot;listToSet&amp;quot;, 1, arr, &amp;quot;table&amp;quot;)&lt;br /&gt;
	local isNan = p.isNan&lt;br /&gt;
	local set = {}&lt;br /&gt;
	for _, v in ipairs(arr) do&lt;br /&gt;
		if not isNan(v) then&lt;br /&gt;
			set[v] = true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return set&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- deepCopy&lt;br /&gt;
--&lt;br /&gt;
-- Recursive deep copy function. Preserves identities of subtables.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
local function _deepCopy(orig, includeMetatable, already_seen)&lt;br /&gt;
	if type(orig) ~= &amp;quot;table&amp;quot; then&lt;br /&gt;
		return orig&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- already_seen stores copies of tables indexed by the original table.&lt;br /&gt;
	local copy = already_seen[orig]&lt;br /&gt;
	if copy ~= nil then&lt;br /&gt;
		return copy&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	copy = {}&lt;br /&gt;
	already_seen[orig] = copy -- memoize before any recursion, to avoid infinite loops&lt;br /&gt;
	&lt;br /&gt;
	for orig_key, orig_value in pairs(orig) do&lt;br /&gt;
		copy[_deepCopy(orig_key, includeMetatable, already_seen)] = _deepCopy(orig_value, includeMetatable, already_seen)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if includeMetatable then&lt;br /&gt;
		local mt = getmetatable(orig)&lt;br /&gt;
		if mt ~= nil then&lt;br /&gt;
			setmetatable(copy, _deepCopy(mt, true, already_seen))&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return copy&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.deepCopy(orig, noMetatable, already_seen)&lt;br /&gt;
	checkType(&amp;quot;deepCopy&amp;quot;, 3, already_seen, &amp;quot;table&amp;quot;, true)&lt;br /&gt;
	return _deepCopy(orig, not noMetatable, already_seen or {})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- sparseConcat&lt;br /&gt;
--&lt;br /&gt;
-- Concatenates all values in the table that are indexed by a number, in order.&lt;br /&gt;
-- sparseConcat{a, nil, c, d}  =&amp;gt;  &amp;quot;acd&amp;quot;&lt;br /&gt;
-- sparseConcat{nil, b, c, d}  =&amp;gt;  &amp;quot;bcd&amp;quot;&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.sparseConcat(t, sep, i, j)&lt;br /&gt;
	local arr = {}&lt;br /&gt;
&lt;br /&gt;
	local arr_i = 0&lt;br /&gt;
	for _, v in p.sparseIpairs(t) do&lt;br /&gt;
		arr_i = arr_i + 1&lt;br /&gt;
		arr[arr_i] = v&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return table.concat(arr, sep, i, j)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- length&lt;br /&gt;
--&lt;br /&gt;
-- Finds the length of an array, or of a quasi-array with keys such as &amp;quot;data1&amp;quot;,&lt;br /&gt;
-- &amp;quot;data2&amp;quot;, etc., using an exponential search algorithm. It is similar to the&lt;br /&gt;
-- operator #, but may return a different value when there are gaps in the array&lt;br /&gt;
-- portion of the table. Intended to be used on data loaded with mw.loadData. For&lt;br /&gt;
-- other tables, use #.&lt;br /&gt;
-- Note: #frame.args in frame object always be set to 0, regardless of  the number&lt;br /&gt;
-- of unnamed template parameters, so use this function for frame.args.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.length(t, prefix)&lt;br /&gt;
	-- requiring module inline so that [[Module:Exponential search]] which is&lt;br /&gt;
	-- only needed by this one function doesn&#039;t get millions of transclusions&lt;br /&gt;
	local expSearch = require(&amp;quot;Module:Exponential search&amp;quot;)&lt;br /&gt;
	checkType(&#039;length&#039;, 1, t, &#039;table&#039;)&lt;br /&gt;
	checkType(&#039;length&#039;, 2, prefix, &#039;string&#039;, true)&lt;br /&gt;
	return expSearch(function (i)&lt;br /&gt;
		local key&lt;br /&gt;
		if prefix then&lt;br /&gt;
			key = prefix .. tostring(i)&lt;br /&gt;
		else&lt;br /&gt;
			key = i&lt;br /&gt;
		end&lt;br /&gt;
		return t[key] ~= nil&lt;br /&gt;
	end) or 0&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- inArray&lt;br /&gt;
--&lt;br /&gt;
-- Returns true if searchElement is a member of the array, and false otherwise.&lt;br /&gt;
-- Equivalent to JavaScript array.includes(searchElement) or&lt;br /&gt;
-- array.includes(searchElement, fromIndex), except fromIndex is 1 indexed&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.inArray(array, searchElement, fromIndex)&lt;br /&gt;
	checkType(&amp;quot;inArray&amp;quot;, 1, array, &amp;quot;table&amp;quot;)&lt;br /&gt;
	-- if searchElement is nil, error?&lt;br /&gt;
&lt;br /&gt;
	fromIndex = tonumber(fromIndex)&lt;br /&gt;
	if fromIndex then&lt;br /&gt;
		if (fromIndex &amp;lt; 0) then&lt;br /&gt;
			fromIndex = #array + fromIndex + 1&lt;br /&gt;
		end&lt;br /&gt;
		if fromIndex &amp;lt; 1 then fromIndex = 1 end&lt;br /&gt;
		for _, v in ipairs({unpack(array, fromIndex)}) do&lt;br /&gt;
			if v == searchElement then&lt;br /&gt;
				return true&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		for _, v in pairs(array) do&lt;br /&gt;
			if v == searchElement then&lt;br /&gt;
				return true&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- merge&lt;br /&gt;
--&lt;br /&gt;
-- Given the arrays, returns an array containing the elements of each input array&lt;br /&gt;
-- in sequence.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.merge(...)&lt;br /&gt;
	local arrays = {...}&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	for i, arr in ipairs(arrays) do&lt;br /&gt;
		checkType(&#039;merge&#039;, i, arr, &#039;table&#039;)&lt;br /&gt;
		for _, v in ipairs(arr) do&lt;br /&gt;
			ret[#ret + 1] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- extend&lt;br /&gt;
--&lt;br /&gt;
-- Extends the first array in place by appending all elements from the second&lt;br /&gt;
-- array.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
function p.extend(arr1, arr2)&lt;br /&gt;
	checkType(&#039;extend&#039;, 1, arr1, &#039;table&#039;)&lt;br /&gt;
	checkType(&#039;extend&#039;, 2, arr2, &#039;table&#039;)&lt;br /&gt;
&lt;br /&gt;
	for _, v in ipairs(arr2) do&lt;br /&gt;
		arr1[#arr1 + 1] = v&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Uses_TemplateStyles/doc&amp;diff=6529</id>
		<title>Module:Uses TemplateStyles/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Uses_TemplateStyles/doc&amp;diff=6529"/>
		<updated>2025-07-31T20:10:31Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lua|Module:Uses TemplateStyles/config|Module:Yesno|Module:List|Module:TableTools|Module:Message box|Module:TNT}}&lt;br /&gt;
&amp;lt;!-- uses data [[c:Data:I18n/Uses_TemplateStyles.tab]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Implements {{tl|Uses TemplateStyles}}.&lt;br /&gt;
&lt;br /&gt;
== A couple test cases ==&lt;br /&gt;
=== One style page ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Uses TemplateStyles/sandbox|Template:Arrowlist/styles.css}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Uses TemplateStyles/sandbox|Template:Arrowlist/styles.css|nocat=true}}&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== Multiple style pages ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Uses TemplateStyles/sandbox|Template:Arrowlist/styles.css|Template:Routemap/styles.css}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Uses TemplateStyles/sandbox|Template:Arrowlist/styles.css|Template:Routemap/styles.css|nocat=true}}&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== Sandbox version of style page exists ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Uses TemplateStyles/sandbox|Template:Uses TemplateStyles/example.css}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Uses TemplateStyles/sandbox|Template:Uses TemplateStyles/example.css|nocat=true}}&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== No style pages specified ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Uses TemplateStyles/sandbox}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Uses TemplateStyles/sandbox|nocat=true}}&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Unicode ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Uses TemplateStyles/sandbox|Template:§&amp;amp;&amp;quot;woof&amp;quot;\//styles.css}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Uses TemplateStyles/sandbox|Template:§&amp;amp;&amp;quot;woof&amp;quot;\//styles.css|nocat=true}}&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Uses_TemplateStyles/config&amp;diff=6528</id>
		<title>Module:Uses TemplateStyles/config</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Uses_TemplateStyles/config&amp;diff=6528"/>
		<updated>2025-07-31T20:08:52Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;local cfg = {} -- Don’t touch this line.  -- Subpage blacklist: these subpages will not be categorized (except for the -- error category, which is always added if there is an error). -- For example “Template:Foo/doc” matches the `doc = true` rule, so it will have -- no categories. “Template:Foo” and “Template:Foo/documentation” match no rules, -- so they *will* have categories. All rules should be in the --   [&amp;#039;&amp;lt;subpage name&amp;gt;&amp;#039;] = true, -- format. cfg[&amp;#039;subpa...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local cfg = {} -- Don’t touch this line.&lt;br /&gt;
&lt;br /&gt;
-- Subpage blacklist: these subpages will not be categorized (except for the&lt;br /&gt;
-- error category, which is always added if there is an error).&lt;br /&gt;
-- For example “Template:Foo/doc” matches the `doc = true` rule, so it will have&lt;br /&gt;
-- no categories. “Template:Foo” and “Template:Foo/documentation” match no rules,&lt;br /&gt;
-- so they *will* have categories. All rules should be in the&lt;br /&gt;
--   [&#039;&amp;lt;subpage name&amp;gt;&#039;] = true,&lt;br /&gt;
-- format.&lt;br /&gt;
cfg[&#039;subpage_blacklist&#039;] = {&lt;br /&gt;
	[&#039;doc&#039;] = true,&lt;br /&gt;
	[&#039;sandbox&#039;] = true,&lt;br /&gt;
	[&#039;sandbox2&#039;] = true,&lt;br /&gt;
	[&#039;testcases&#039;] = true,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-- Sandbox title: if the stylesheet’s title is &amp;lt;template&amp;gt;/&amp;lt;stylesheet&amp;gt;.css, the&lt;br /&gt;
-- stylesheet’s sandbox is expected to be at &amp;lt;template&amp;gt;/&amp;lt;sandbox_title&amp;gt;/&amp;lt;stylesheet&amp;gt;.css&lt;br /&gt;
-- Set to nil to disable sandbox links.&lt;br /&gt;
cfg[&#039;sandbox_title&#039;] = &#039;sandbox&#039;&lt;br /&gt;
&lt;br /&gt;
-- Error category: this category is added if the module call contains errors&lt;br /&gt;
-- (e.g. no stylesheet listed). A category name without namespace, or nil&lt;br /&gt;
-- to disable categorization (not recommended).&lt;br /&gt;
cfg[&#039;error_category&#039;] = &#039;Uses TemplateStyles templates with errors&#039;&lt;br /&gt;
&lt;br /&gt;
-- Default category: this category is added if no custom category is specified&lt;br /&gt;
-- in module/template call. A category name without namespace, or nil&lt;br /&gt;
-- to disable categorization.&lt;br /&gt;
cfg[&#039;default_category&#039;] = &#039;Templates using TemplateStyles&#039;&lt;br /&gt;
&lt;br /&gt;
-- Protection conflict category: this category is added if the protection level&lt;br /&gt;
-- of any stylesheet is lower than the protection level of the template. A category name&lt;br /&gt;
-- without namespace, or nil to disable categorization (not recommended).&lt;br /&gt;
cfg[&#039;protection_conflict_category&#039;] = &#039;Templates using TemplateStyles with a different protection level&#039;&lt;br /&gt;
&lt;br /&gt;
-- Hierarchy of protection levels, used to determine whether one protection level is lower&lt;br /&gt;
-- than another and thus should populate protection_conflict_category. No protection is treated as zero &lt;br /&gt;
cfg[&#039;protection_hierarchy&#039;]  = {&lt;br /&gt;
	autoconfirmed = 1,&lt;br /&gt;
	extendedconfirmed = 2,&lt;br /&gt;
	templateeditor = 3,&lt;br /&gt;
	sysop = 4&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-- Padlock pattern: Lua pattern to search on protected stylesheets for, or nil&lt;br /&gt;
-- to disable padlock check.&lt;br /&gt;
cfg[&#039;padlock_pattern&#039;] = &#039;{{pp-&#039;&lt;br /&gt;
&lt;br /&gt;
-- Missing padlock category: this category is added if a protected stylesheet&lt;br /&gt;
-- doesn’t contain any padlock template (specified by the above Lua pattern).&lt;br /&gt;
-- A category name without namespace (no nil allowed) if the pattern is not nil,&lt;br /&gt;
-- unused (and thus may be nil) otherwise.&lt;br /&gt;
cfg[&#039;missing_padlock_category&#039;] = &#039;Templates using TemplateStyles without padlocks&#039;&lt;br /&gt;
&lt;br /&gt;
-- Default subpage for the stylesheet if none is given&lt;br /&gt;
cfg[&#039;default_subpage_name&#039;] = &#039;styles.css&#039;&lt;br /&gt;
return cfg -- Don’t touch this line.&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Uses_TemplateStyles/doc&amp;diff=6527</id>
		<title>Module:Uses TemplateStyles/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Uses_TemplateStyles/doc&amp;diff=6527"/>
		<updated>2025-07-31T20:08:21Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lua|Module:Uses TemplateStyles/config|Module:Yesno|Module:List|Module:TableTools|Module:Message box|Module:TNT}}&lt;br /&gt;
&amp;lt;!-- uses data [[c:Data:I18n/Uses_TemplateStyles.tab]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Implements {{tl|Uses TemplateStyles}}.&lt;br /&gt;
&lt;br /&gt;
== A couple test cases ==&lt;br /&gt;
=== One style page ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Uses TemplateStyles/sandbox|Template:Arrowlist/styles.css}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Uses TemplateStyles/sandbox|Template:Arrowlist/styles.css|nocat=true}}&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== Multiple style pages ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Uses TemplateStyles/sandbox|Template:Arrowlist/styles.css|Template:Routemap/styles.css}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Uses TemplateStyles/sandbox|Template:Arrowlist/styles.css|Template:Routemap/styles.css|nocat=true}}&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== Sandbox version of style page exists ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Uses TemplateStyles/sandbox|Template:Uses TemplateStyles/example.css}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Uses TemplateStyles/sandbox|Template:Uses TemplateStyles/example.css|nocat=true}}&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== No style pages specified ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Uses TemplateStyles/sandbox}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Uses TemplateStyles/sandbox|nocat=true}}&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Unicode ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Uses TemplateStyles/sandbox|Template:§&amp;amp;&amp;quot;woof&amp;quot;\//styles.css}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Uses TemplateStyles/sandbox|Template:§&amp;amp;&amp;quot;woof&amp;quot;\//styles.css|nocat=true}}&lt;br /&gt;
{{clear}}&lt;br /&gt;
{{cob}}&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Template:Uses_TemplateStyles&amp;diff=6526</id>
		<title>Template:Uses TemplateStyles</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Template:Uses_TemplateStyles&amp;diff=6526"/>
		<updated>2025-07-31T20:04:04Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;&amp;lt;includeonly&amp;gt;{{#invoke:Uses TemplateStyles|main}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;{{documentation}} &amp;lt;!-- Categories go on the /doc subpage and interwikis go on Wikidata. --&amp;gt; &amp;lt;/noinclude&amp;gt;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;{{#invoke:Uses TemplateStyles|main}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;{{documentation}}&lt;br /&gt;
&amp;lt;!-- Categories go on the /doc subpage and interwikis go on Wikidata. --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Uses_TemplateStyles/doc&amp;diff=6525</id>
		<title>Module:Uses TemplateStyles/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Uses_TemplateStyles/doc&amp;diff=6525"/>
		<updated>2025-07-31T20:03:46Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;{{Lua|Module:Uses TemplateStyles/config|Module:Yesno|Module:List|Module:TableTools|Module:Message box|Module:TNT}} &amp;lt;!-- uses data c:Data:I18n/Uses_TemplateStyles.tab --&amp;gt;  Implements {{tl|Uses TemplateStyles}}.  {{cot|A couple test cases}} ===One style page=== &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Uses TemplateStyles/sandbox|Template:Arrowlist/styles.css}}&amp;lt;/syntaxhighlight&amp;gt; {{Uses TemplateStyles/sandbox|Template:Arrowlist/styles.css|nocat=true}} {{clear}} ===Multi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lua|Module:Uses TemplateStyles/config|Module:Yesno|Module:List|Module:TableTools|Module:Message box|Module:TNT}}&lt;br /&gt;
&amp;lt;!-- uses data [[c:Data:I18n/Uses_TemplateStyles.tab]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Implements {{tl|Uses TemplateStyles}}.&lt;br /&gt;
&lt;br /&gt;
{{cot|A couple test cases}}&lt;br /&gt;
===One style page===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Uses TemplateStyles/sandbox|Template:Arrowlist/styles.css}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Uses TemplateStyles/sandbox|Template:Arrowlist/styles.css|nocat=true}}&lt;br /&gt;
{{clear}}&lt;br /&gt;
===Multiple style pages===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Uses TemplateStyles/sandbox|Template:Arrowlist/styles.css|Template:Routemap/styles.css}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Uses TemplateStyles/sandbox|Template:Arrowlist/styles.css|Template:Routemap/styles.css|nocat=true}}&lt;br /&gt;
{{clear}}&lt;br /&gt;
===Sandbox version of style page exists===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Uses TemplateStyles/sandbox|Template:Uses TemplateStyles/example.css}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Uses TemplateStyles/sandbox|Template:Uses TemplateStyles/example.css|nocat=true}}&lt;br /&gt;
{{clear}}&lt;br /&gt;
===No style pages specified===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Uses TemplateStyles/sandbox}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Uses TemplateStyles/sandbox|nocat=true}}&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
===Unicode===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Uses TemplateStyles/sandbox|Template:§&amp;amp;&amp;quot;woof&amp;quot;\//styles.css}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Uses TemplateStyles/sandbox|Template:§&amp;amp;&amp;quot;woof&amp;quot;\//styles.css|nocat=true}}&lt;br /&gt;
{{clear}}&lt;br /&gt;
{{cob}}&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Uses_TemplateStyles&amp;diff=6524</id>
		<title>Module:Uses TemplateStyles</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Uses_TemplateStyles&amp;diff=6524"/>
		<updated>2025-07-31T20:03:23Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Imported from Wikipedia.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local yesno = require(&#039;Module:Yesno&#039;)&lt;br /&gt;
local mList = require(&#039;Module:List&#039;)&lt;br /&gt;
local mTableTools = require(&#039;Module:TableTools&#039;)&lt;br /&gt;
local mMessageBox = require(&#039;Module:Message box&#039;)&lt;br /&gt;
local TNT = require(&#039;Module:TNT&#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function format(msg, ...)&lt;br /&gt;
	return TNT.format(&#039;I18n/Uses TemplateStyles&#039;, msg, ...)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getConfig()&lt;br /&gt;
	return mw.loadData(&#039;Module:Uses TemplateStyles/config&#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function renderBox(tStyles)&lt;br /&gt;
	local boxArgs = {&lt;br /&gt;
		type = &#039;notice&#039;,&lt;br /&gt;
		small = true,&lt;br /&gt;
		image = string.format(&#039;[[File:Farm-Fresh css add.svg|32px|alt=%s]]&#039;, format(&#039;logo-alt&#039;))&lt;br /&gt;
	}&lt;br /&gt;
	if #tStyles &amp;lt; 1 then&lt;br /&gt;
		boxArgs.text = string.format(&#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;%s&amp;lt;/strong&amp;gt;&#039;, format(&#039;error-emptylist&#039;))&lt;br /&gt;
	else&lt;br /&gt;
		local cfg = getConfig()&lt;br /&gt;
		local tStylesLinks = {}&lt;br /&gt;
		for i, ts in ipairs(tStyles) do&lt;br /&gt;
			local link = string.format(&#039;[[:%s]]&#039;, ts)&lt;br /&gt;
			local sandboxLink = nil&lt;br /&gt;
			local tsTitle = mw.title.new(ts)&lt;br /&gt;
			if tsTitle and cfg[&#039;sandbox_title&#039;] then&lt;br /&gt;
				local tsSandboxTitle = mw.title.new(string.format(&lt;br /&gt;
					&#039;%s:%s/%s/%s&#039;, tsTitle.nsText, tsTitle.baseText, cfg[&#039;sandbox_title&#039;], tsTitle.subpageText))&lt;br /&gt;
				if tsSandboxTitle and tsSandboxTitle.exists then&lt;br /&gt;
					sandboxLink = format(&#039;sandboxlink&#039;, link, &#039;:&#039; .. tsSandboxTitle.prefixedText)&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			tStylesLinks[i] = sandboxLink or link&lt;br /&gt;
		end&lt;br /&gt;
		local tStylesList = mList.makeList(&#039;bulleted&#039;, tStylesLinks)&lt;br /&gt;
		boxArgs.text = format(&lt;br /&gt;
			mw.title.getCurrentTitle():inNamespaces(828,829) and &#039;header-module&#039; or &#039;header-template&#039;) ..&lt;br /&gt;
			&#039;\n&#039; .. tStylesList&lt;br /&gt;
	end&lt;br /&gt;
	return mMessageBox.main(&#039;mbox&#039;, boxArgs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function renderTrackingCategories(args, tStyles, titleObj)&lt;br /&gt;
	if yesno(args.nocat) then&lt;br /&gt;
		return &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local cfg = getConfig()&lt;br /&gt;
	&lt;br /&gt;
	local cats = {}&lt;br /&gt;
	&lt;br /&gt;
	-- Error category&lt;br /&gt;
	if #tStyles &amp;lt; 1 and cfg[&#039;error_category&#039;] then&lt;br /&gt;
		cats[#cats + 1] = cfg[&#039;error_category&#039;]&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- TemplateStyles category&lt;br /&gt;
	titleObj = titleObj or mw.title.getCurrentTitle()&lt;br /&gt;
	if (titleObj.namespace == 10 or titleObj.namespace == 828)&lt;br /&gt;
		and not cfg[&#039;subpage_blacklist&#039;][titleObj.subpageText]&lt;br /&gt;
	then&lt;br /&gt;
		local category = args.category or cfg[&#039;default_category&#039;]&lt;br /&gt;
		if category then&lt;br /&gt;
			cats[#cats + 1] = category&lt;br /&gt;
		end&lt;br /&gt;
		if not yesno(args.noprotcat) and (cfg[&#039;protection_conflict_category&#039;] or cfg[&#039;padlock_pattern&#039;]) then&lt;br /&gt;
			local currentProt = titleObj.protectionLevels[&amp;quot;edit&amp;quot;] and titleObj.protectionLevels[&amp;quot;edit&amp;quot;][1] or nil&lt;br /&gt;
			local addedLevelCat = false&lt;br /&gt;
			local addedPadlockCat = false&lt;br /&gt;
			for i, ts in ipairs(tStyles) do&lt;br /&gt;
				local tsTitleObj = mw.title.new(ts)&lt;br /&gt;
				local tsProt = tsTitleObj.protectionLevels[&amp;quot;edit&amp;quot;] and tsTitleObj.protectionLevels[&amp;quot;edit&amp;quot;][1] or nil&lt;br /&gt;
				if cfg[&#039;padlock_pattern&#039;] and tsProt and not addedPadlockCat then&lt;br /&gt;
					local content = tsTitleObj:getContent()&lt;br /&gt;
					if not content:find(cfg[&#039;padlock_pattern&#039;]) then&lt;br /&gt;
						cats[#cats + 1] = cfg[&#039;missing_padlock_category&#039;]&lt;br /&gt;
						addedPadlockCat = true&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
				if cfg[&#039;protection_conflict_category&#039;] and currentProt and tsProt ~= currentProt and not addedLevelCat then&lt;br /&gt;
					currentProt = cfg[&#039;protection_hierarchy&#039;][currentProt] or 0&lt;br /&gt;
					tsProt = cfg[&#039;protection_hierarchy&#039;][tsProt] or 0&lt;br /&gt;
					if tsProt &amp;lt; currentProt then&lt;br /&gt;
						addedLevelCat = true&lt;br /&gt;
						cats[#cats + 1] = cfg[&#039;protection_conflict_category&#039;]&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for i, cat in ipairs(cats) do&lt;br /&gt;
		cats[i] = string.format(&#039;[[Category:%s]]&#039;, cat)&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(cats)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local cfg = getConfig()&lt;br /&gt;
	if #args == 0 then&lt;br /&gt;
		local prefixed = mw.title.getCurrentTitle().prefixedText&lt;br /&gt;
		prefixed = prefixed:gsub(&amp;quot;/doc&amp;quot;,&amp;quot;&amp;quot;)&lt;br /&gt;
		args[1] = prefixed .. &amp;quot;/&amp;quot; .. cfg[&amp;quot;default_subpage_name&amp;quot;]&lt;br /&gt;
	end&lt;br /&gt;
	local tStyles = mTableTools.compressSparseArray(args)&lt;br /&gt;
	local box = renderBox(tStyles)&lt;br /&gt;
	local trackingCategories = renderTrackingCategories(args, tStyles)&lt;br /&gt;
	return box .. trackingCategories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local origArgs = frame:getParent().args&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for k, v in pairs(origArgs) do&lt;br /&gt;
		v = v:match(&#039;^%s*(.-)%s*$&#039;)&lt;br /&gt;
		if v ~= &#039;&#039; then&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Shortcut/styles.css&amp;diff=6523</id>
		<title>Module:Shortcut/styles.css</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Shortcut/styles.css&amp;diff=6523"/>
		<updated>2025-07-31T20:02:03Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;/* {{pp-template}} */ .module-shortcutboxplain { 	float: right; 	margin: 0 0 0 1em; 	border: 1px solid #a2a9b1;           /* removed var() */ 	background-color: #fff;              /* removed var() */ 	padding: 0.3em 0.6em 0.2em 0.6em; 	text-align: center; 	font-size: 85%; }  .module-shortcutboxleft { 	float: left; 	margin: 0 1em 0 0; }  .module-shortcutlist { 	display: inline-block; 	border-bottom: 1px solid #a2a9b1;    /* removed var() */ 	margin-bottom: 0.2em; }  .modu...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* {{pp-template}} */&lt;br /&gt;
.module-shortcutboxplain {&lt;br /&gt;
	float: right;&lt;br /&gt;
	margin: 0 0 0 1em;&lt;br /&gt;
	border: 1px solid #a2a9b1;           /* removed var() */&lt;br /&gt;
	background-color: #fff;              /* removed var() */&lt;br /&gt;
	padding: 0.3em 0.6em 0.2em 0.6em;&lt;br /&gt;
	text-align: center;&lt;br /&gt;
	font-size: 85%;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.module-shortcutboxleft {&lt;br /&gt;
	float: left;&lt;br /&gt;
	margin: 0 1em 0 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.module-shortcutlist {&lt;br /&gt;
	display: inline-block;&lt;br /&gt;
	border-bottom: 1px solid #a2a9b1;    /* removed var() */&lt;br /&gt;
	margin-bottom: 0.2em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.module-shortcutboxplain ul {&lt;br /&gt;
	font-weight: bold;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.module-shortcutanchordiv {&lt;br /&gt;
	position: relative;&lt;br /&gt;
	top: -3em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
li .module-shortcutanchordiv {&lt;br /&gt;
	float: right; /* IE/Edge in list items */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.mbox-imageright .module-shortcutboxplain {&lt;br /&gt;
	padding: 0.4em 1em 0.4em 1em;&lt;br /&gt;
	line-height: 1.3;&lt;br /&gt;
	margin: 0;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Sidebar/doc&amp;diff=6522</id>
		<title>Module:Sidebar/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Sidebar/doc&amp;diff=6522"/>
		<updated>2025-07-31T19:50:51Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Documentation subpage|Module documentation subpages}}&lt;br /&gt;
{{Lua|Module:Sidebar/configuration|Module:Navbar|Module:Arguments}}&lt;br /&gt;
{{Uses TemplateStyles|Module:Sidebar/styles.css|Template:Plainlist/styles.css|Template:Hlist/styles.css}}&lt;br /&gt;
&lt;br /&gt;
This module implements the templates {{tl|sidebar}} and {{tl|sidebar with collapsible lists}}. See the individual template pages for documentation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Sidebar metatemplates| ]]&lt;br /&gt;
[[Category:Modules that add a tracking category]]&lt;br /&gt;
[[Category:Modules that check for strip markers]]&lt;br /&gt;
[[Category:Box modules]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Sidebar/doc&amp;diff=6521</id>
		<title>Module:Sidebar/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Sidebar/doc&amp;diff=6521"/>
		<updated>2025-07-31T19:50:43Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;{{Documentation subpage|Module documentation subpage}} {{Lua|Module:Sidebar/configuration|Module:Navbar|Module:Arguments}} {{Uses TemplateStyles|Module:Sidebar/styles.css|Template:Plainlist/styles.css|Template:Hlist/styles.css}}  This module implements the templates {{tl|sidebar}} and {{tl|sidebar with collapsible lists}}. See the individual template pages for documentation.  &amp;lt;includeonly&amp;gt;{{sandbox other|| &amp;lt;!-- Categories below this line; interwikis at Wikidata --&amp;gt; Cat...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Documentation subpage|Module documentation subpage}}&lt;br /&gt;
{{Lua|Module:Sidebar/configuration|Module:Navbar|Module:Arguments}}&lt;br /&gt;
{{Uses TemplateStyles|Module:Sidebar/styles.css|Template:Plainlist/styles.css|Template:Hlist/styles.css}}&lt;br /&gt;
&lt;br /&gt;
This module implements the templates {{tl|sidebar}} and {{tl|sidebar with collapsible lists}}. See the individual template pages for documentation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Sidebar metatemplates| ]]&lt;br /&gt;
[[Category:Modules that add a tracking category]]&lt;br /&gt;
[[Category:Modules that check for strip markers]]&lt;br /&gt;
[[Category:Box modules]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Sidebar&amp;diff=6520</id>
		<title>Module:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Sidebar&amp;diff=6520"/>
		<updated>2025-07-31T19:50:03Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Imported from Wikipedia.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;require(&#039;strict&#039;)&lt;br /&gt;
local cfg = mw.loadData(&#039;Module:Sidebar/configuration&#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local getArgs = require(&#039;Module:Arguments&#039;).getArgs&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Categorizes calling templates and modules with a &#039;style&#039; parameter of any sort&lt;br /&gt;
for tracking to convert to TemplateStyles.&lt;br /&gt;
&lt;br /&gt;
TODO after a long cleanup: Catch sidebars in other namespaces than Template and Module.&lt;br /&gt;
TODO would probably want to remove /log and /archive as CS1 does&lt;br /&gt;
]]&lt;br /&gt;
local function categorizeTemplatesWithInlineStyles(args)&lt;br /&gt;
	local title = mw.title.getCurrentTitle()&lt;br /&gt;
	if title.namespace ~= 10 and title.namespace ~= 828 then return &#039;&#039; end&lt;br /&gt;
	for _, pattern in ipairs (cfg.i18n.pattern.uncategorized_conversion_titles) do&lt;br /&gt;
		if title.text:match(pattern) then return &#039;&#039; end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	for key, _ in pairs(args) do&lt;br /&gt;
		if mw.ustring.find(key, cfg.i18n.pattern.style_conversion) or key == &#039;width&#039; then&lt;br /&gt;
			return cfg.i18n.category.conversion&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
For compatibility with the original {{sidebar with collapsible lists}}&lt;br /&gt;
implementation, which passed some parameters through {{#if}} to trim their&lt;br /&gt;
whitespace. This also triggered the automatic newline behavior.&lt;br /&gt;
]]&lt;br /&gt;
-- See ([[meta:Help:Newlines and spaces#Automatic newline]])&lt;br /&gt;
local function trimAndAddAutomaticNewline(s)&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;quot;^%s*(.-)%s*$&amp;quot;, &amp;quot;%1&amp;quot;)&lt;br /&gt;
	if mw.ustring.find(s, &#039;^[#*:;]&#039;) or mw.ustring.find(s, &#039;^{|&#039;) then&lt;br /&gt;
		return &#039;\n&#039; .. s&lt;br /&gt;
	else&lt;br /&gt;
		return s&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Finds whether a sidebar has a subgroup sidebar.&lt;br /&gt;
]]&lt;br /&gt;
local function hasSubgroup(s)&lt;br /&gt;
	if mw.ustring.find(s, cfg.i18n.pattern.subgroup) then&lt;br /&gt;
		return true&lt;br /&gt;
	else&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function has_navbar(navbar_mode, sidebar_name)&lt;br /&gt;
	return navbar_mode ~= cfg.i18n.navbar_none and&lt;br /&gt;
		navbar_mode ~= cfg.i18n.navbar_off and&lt;br /&gt;
		(&lt;br /&gt;
			sidebar_name or&lt;br /&gt;
			mw.getCurrentFrame():getParent():getTitle():gsub(cfg.i18n.pattern.sandbox, &#039;&#039;) ~=&lt;br /&gt;
			cfg.i18n.title_not_to_add_navbar&lt;br /&gt;
		)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function has_list_class(args, htmlclass)&lt;br /&gt;
	local patterns = {&lt;br /&gt;
		&#039;^&#039; .. htmlclass .. &#039;$&#039;,&lt;br /&gt;
		&#039;%s&#039; .. htmlclass .. &#039;$&#039;,&lt;br /&gt;
		&#039;^&#039; .. htmlclass .. &#039;%s&#039;,&lt;br /&gt;
		&#039;%s&#039; .. htmlclass .. &#039;%s&#039;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	for arg, value in pairs(args) do&lt;br /&gt;
		if type(arg) == &#039;string&#039; and mw.ustring.find(arg, &#039;class&#039;) then&lt;br /&gt;
			for _, pattern in ipairs(patterns) do&lt;br /&gt;
				if mw.ustring.find(args[arg] or &#039;&#039;, pattern) then&lt;br /&gt;
					return true&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- there are a lot of list classes in the wild, so we add their TemplateStyles&lt;br /&gt;
local function add_list_styles(args)&lt;br /&gt;
	local frame = mw.getCurrentFrame()&lt;br /&gt;
	local function add_list_templatestyles(htmlclass, templatestyles)&lt;br /&gt;
		if has_list_class(args, htmlclass) then&lt;br /&gt;
			return frame:extensionTag{&lt;br /&gt;
				name = &#039;templatestyles&#039;, args = { src = templatestyles }&lt;br /&gt;
			}&lt;br /&gt;
		else&lt;br /&gt;
			return &#039;&#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local plainlist_styles = add_list_templatestyles(&#039;plainlist&#039;, cfg.i18n.plainlist_templatestyles)&lt;br /&gt;
	local hlist_styles = add_list_templatestyles(&#039;hlist&#039;, cfg.i18n.hlist_templatestyles)&lt;br /&gt;
	&lt;br /&gt;
	-- a second workaround for [[phab:T303378]]&lt;br /&gt;
	-- when that issue is fixed, we can actually use has_navbar not to emit the&lt;br /&gt;
	-- tag here if we want&lt;br /&gt;
	if has_navbar(args.navbar, args.name) and hlist_styles == &#039;&#039; then&lt;br /&gt;
		hlist_styles = frame:extensionTag{&lt;br /&gt;
			name = &#039;templatestyles&#039;, args = { src = cfg.i18n.hlist_templatestyles}&lt;br /&gt;
		}&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- hlist -&amp;gt; plainlist is best-effort to preserve old Common.css ordering. [hlist_note]&lt;br /&gt;
	return hlist_styles .. plainlist_styles&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- work around [[phab:T303378]]&lt;br /&gt;
-- for each arg: find all the templatestyles strip markers, insert them into a&lt;br /&gt;
-- table. then remove all templatestyles markers from the arg&lt;br /&gt;
local function move_hiding_templatestyles(args)&lt;br /&gt;
	local gfind = string.gfind&lt;br /&gt;
	local gsub = string.gsub&lt;br /&gt;
	local templatestyles_markers = {}&lt;br /&gt;
	local strip_marker_pattern = &#039;(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)&#039;&lt;br /&gt;
	for k, arg in pairs(args) do&lt;br /&gt;
		for marker in gfind(arg, strip_marker_pattern) do&lt;br /&gt;
			table.insert(templatestyles_markers, marker)&lt;br /&gt;
		end&lt;br /&gt;
		args[k] = gsub(arg, strip_marker_pattern, &#039;&#039;)&lt;br /&gt;
	end&lt;br /&gt;
	return templatestyles_markers&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Main sidebar function. Takes the frame, args, and an optional collapsibleClass.&lt;br /&gt;
The collapsibleClass is and should be used only for sidebars with collapsible&lt;br /&gt;
lists, as in p.collapsible.&lt;br /&gt;
]]&lt;br /&gt;
function p.sidebar(frame, args, collapsibleClass)&lt;br /&gt;
	if not args then&lt;br /&gt;
		args = getArgs(frame)&lt;br /&gt;
	end&lt;br /&gt;
	local hiding_templatestyles = table.concat(move_hiding_templatestyles(args))&lt;br /&gt;
	local root = mw.html.create()&lt;br /&gt;
	local child = args.child and mw.text.trim(args.child) == cfg.i18n.child_yes&lt;br /&gt;
&lt;br /&gt;
	root = root:tag(&#039;table&#039;)&lt;br /&gt;
	if not child then&lt;br /&gt;
		root &lt;br /&gt;
			:addClass(cfg.i18n.class.sidebar)&lt;br /&gt;
			-- force collapsibleclass to be sidebar-collapse otherwise output nothing&lt;br /&gt;
			:addClass(collapsibleClass == cfg.i18n.class.collapse and cfg.i18n.class.collapse or nil)&lt;br /&gt;
			:addClass(&#039;nomobile&#039;)&lt;br /&gt;
			:addClass(args.float == cfg.i18n.float_none and cfg.i18n.class.float_none or nil)&lt;br /&gt;
			:addClass(args.float == cfg.i18n.float_left and cfg.i18n.class.float_left or nil)&lt;br /&gt;
			:addClass(args.wraplinks ~= cfg.i18n.wrap_true and cfg.i18n.class.wraplinks or nil)&lt;br /&gt;
			:addClass(args.bodyclass or args.class)&lt;br /&gt;
			:css(&#039;width&#039;, args.width or nil)&lt;br /&gt;
			:cssText(args.bodystyle or args.style)&lt;br /&gt;
&lt;br /&gt;
		if args.outertitle then&lt;br /&gt;
			root&lt;br /&gt;
				:tag(&#039;caption&#039;)&lt;br /&gt;
					:addClass(cfg.i18n.class.outer_title)&lt;br /&gt;
					:addClass(args.outertitleclass)&lt;br /&gt;
					:cssText(args.outertitlestyle)&lt;br /&gt;
					:wikitext(args.outertitle)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if args.topimage then&lt;br /&gt;
			local imageCell = root:tag(&#039;tr&#039;):tag(&#039;td&#039;)&lt;br /&gt;
&lt;br /&gt;
			imageCell&lt;br /&gt;
				:addClass(cfg.i18n.class.top_image)&lt;br /&gt;
				:addClass(args.topimageclass)&lt;br /&gt;
				:cssText(args.topimagestyle)&lt;br /&gt;
				:wikitext(args.topimage)&lt;br /&gt;
&lt;br /&gt;
			if args.topcaption then&lt;br /&gt;
				imageCell&lt;br /&gt;
					:tag(&#039;div&#039;)&lt;br /&gt;
						:addClass(cfg.i18n.class.top_caption)&lt;br /&gt;
						:cssText(args.topcaptionstyle)&lt;br /&gt;
						:wikitext(args.topcaption)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if args.pretitle then&lt;br /&gt;
			root&lt;br /&gt;
				:tag(&#039;tr&#039;)&lt;br /&gt;
					:tag(&#039;td&#039;)&lt;br /&gt;
						:addClass(args.topimage and cfg.i18n.class.pretitle_with_top_image&lt;br /&gt;
							or cfg.i18n.class.pretitle)&lt;br /&gt;
						:addClass(args.pretitleclass)&lt;br /&gt;
						:cssText(args.basestyle)&lt;br /&gt;
						:cssText(args.pretitlestyle)&lt;br /&gt;
						:wikitext(args.pretitle)&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		root&lt;br /&gt;
			:addClass(cfg.i18n.class.subgroup)&lt;br /&gt;
			:addClass(args.bodyclass or args.class)&lt;br /&gt;
			:cssText(args.bodystyle or args.style)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.title then&lt;br /&gt;
		if child then&lt;br /&gt;
			root&lt;br /&gt;
				:wikitext(args.title)&lt;br /&gt;
		else&lt;br /&gt;
			root&lt;br /&gt;
				:tag(&#039;tr&#039;)&lt;br /&gt;
					:tag(&#039;th&#039;)&lt;br /&gt;
						:addClass(args.pretitle and cfg.i18n.class.title_with_pretitle&lt;br /&gt;
							or cfg.i18n.class.title)&lt;br /&gt;
						:addClass(args.titleclass)&lt;br /&gt;
						:cssText(args.basestyle)&lt;br /&gt;
						:cssText(args.titlestyle)&lt;br /&gt;
						:wikitext(args.title)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.image then&lt;br /&gt;
		local imageCell = root:tag(&#039;tr&#039;):tag(&#039;td&#039;)&lt;br /&gt;
&lt;br /&gt;
		imageCell&lt;br /&gt;
			:addClass(cfg.i18n.class.image)&lt;br /&gt;
			:addClass(args.imageclass)&lt;br /&gt;
			:cssText(args.imagestyle)&lt;br /&gt;
			:wikitext(args.image)&lt;br /&gt;
&lt;br /&gt;
		if args.caption then&lt;br /&gt;
			imageCell&lt;br /&gt;
				:tag(&#039;div&#039;)&lt;br /&gt;
					:addClass(cfg.i18n.class.caption)&lt;br /&gt;
					:cssText(args.captionstyle)&lt;br /&gt;
					:wikitext(args.caption)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.above then&lt;br /&gt;
		root&lt;br /&gt;
			:tag(&#039;tr&#039;)&lt;br /&gt;
				:tag(&#039;td&#039;)&lt;br /&gt;
					:addClass(cfg.i18n.class.above)&lt;br /&gt;
					:addClass(args.aboveclass)&lt;br /&gt;
					:cssText(args.abovestyle)&lt;br /&gt;
					:newline() -- newline required for bullet-points to work&lt;br /&gt;
					:wikitext(args.above)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local rowNums = {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		k = &#039;&#039; .. k&lt;br /&gt;
		local num = k:match(&#039;^heading(%d+)$&#039;) or k:match(&#039;^content(%d+)$&#039;)&lt;br /&gt;
		if num then table.insert(rowNums, tonumber(num)) end&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(rowNums)&lt;br /&gt;
	-- remove duplicates from the list (e.g. 3 will be duplicated if both heading3&lt;br /&gt;
	-- and content3 are specified)&lt;br /&gt;
	for i = #rowNums, 1, -1 do&lt;br /&gt;
		if rowNums[i] == rowNums[i - 1] then&lt;br /&gt;
			table.remove(rowNums, i)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	for i, num in ipairs(rowNums) do&lt;br /&gt;
		local heading = args[&#039;heading&#039; .. num]&lt;br /&gt;
		if heading then&lt;br /&gt;
			root&lt;br /&gt;
				:tag(&#039;tr&#039;)&lt;br /&gt;
					:tag(&#039;th&#039;)&lt;br /&gt;
						:addClass(cfg.i18n.class.heading)&lt;br /&gt;
						:addClass(args.headingclass)&lt;br /&gt;
						:addClass(args[&#039;heading&#039; .. num .. &#039;class&#039;])&lt;br /&gt;
						:cssText(args.basestyle)&lt;br /&gt;
						:cssText(args.headingstyle)&lt;br /&gt;
						:cssText(args[&#039;heading&#039; .. num .. &#039;style&#039;])&lt;br /&gt;
						:newline()&lt;br /&gt;
						:wikitext(heading)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		local content = args[&#039;content&#039; .. num]&lt;br /&gt;
		if content then&lt;br /&gt;
			root&lt;br /&gt;
				:tag(&#039;tr&#039;)&lt;br /&gt;
					:tag(&#039;td&#039;)&lt;br /&gt;
						:addClass(hasSubgroup(content) and cfg.i18n.class.content_with_subgroup&lt;br /&gt;
							or cfg.i18n.class.content)&lt;br /&gt;
						:addClass(args.contentclass)&lt;br /&gt;
						:addClass(args[&#039;content&#039; .. num .. &#039;class&#039;])&lt;br /&gt;
						:cssText(args.contentstyle)&lt;br /&gt;
						:cssText(args[&#039;content&#039; .. num .. &#039;style&#039;])&lt;br /&gt;
						:newline()&lt;br /&gt;
						:wikitext(content)&lt;br /&gt;
						:done()&lt;br /&gt;
					 -- Without a linebreak after the &amp;lt;/td&amp;gt;, a nested list like&lt;br /&gt;
					 -- &amp;quot;* {{hlist| ...}}&amp;quot; doesn&#039;t parse correctly.&lt;br /&gt;
					:newline()&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.below then&lt;br /&gt;
		root&lt;br /&gt;
			:tag(&#039;tr&#039;)&lt;br /&gt;
				:tag(&#039;td&#039;)&lt;br /&gt;
					:addClass(cfg.i18n.class.below)&lt;br /&gt;
					:addClass(args.belowclass)&lt;br /&gt;
					:cssText(args.belowstyle)&lt;br /&gt;
					:newline()&lt;br /&gt;
					:wikitext(args.below)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if not child and has_navbar(args.navbar, args.name) then&lt;br /&gt;
		root&lt;br /&gt;
			:tag(&#039;tr&#039;)&lt;br /&gt;
				:tag(&#039;td&#039;)&lt;br /&gt;
					:addClass(cfg.i18n.class.navbar)&lt;br /&gt;
					:cssText(args.navbarstyle)&lt;br /&gt;
					:wikitext(require(&#039;Module:Navbar&#039;)._navbar{&lt;br /&gt;
						args.name,&lt;br /&gt;
						mini = 1,&lt;br /&gt;
						fontstyle = args.navbarfontstyle&lt;br /&gt;
					})&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local base_templatestyles = frame:extensionTag{&lt;br /&gt;
		name = &#039;templatestyles&#039;, args = { src = cfg.i18n.templatestyles }&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	local templatestyles = &#039;&#039;&lt;br /&gt;
	if args[&#039;templatestyles&#039;] and args[&#039;templatestyles&#039;] ~= &#039;&#039; then&lt;br /&gt;
		templatestyles = frame:extensionTag{&lt;br /&gt;
			name = &#039;templatestyles&#039;, args = { src = args[&#039;templatestyles&#039;] }&lt;br /&gt;
		}&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local child_templatestyles = &#039;&#039;&lt;br /&gt;
	if args[&#039;child templatestyles&#039;] and args[&#039;child templatestyles&#039;] ~= &#039;&#039; then&lt;br /&gt;
		child_templatestyles = frame:extensionTag{&lt;br /&gt;
			name = &#039;templatestyles&#039;, args = { src = args[&#039;child templatestyles&#039;] }&lt;br /&gt;
		}&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local grandchild_templatestyles = &#039;&#039;&lt;br /&gt;
	if args[&#039;grandchild templatestyles&#039;] and args[&#039;grandchild templatestyles&#039;] ~= &#039;&#039; then&lt;br /&gt;
		grandchild_templatestyles = frame:extensionTag{&lt;br /&gt;
			name = &#039;templatestyles&#039;, args = { src = args[&#039;grandchild templatestyles&#039;] }&lt;br /&gt;
		}&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return table.concat({&lt;br /&gt;
		add_list_styles(args), -- see [hlist_note] above about ordering&lt;br /&gt;
		base_templatestyles,&lt;br /&gt;
		templatestyles,&lt;br /&gt;
		child_templatestyles,&lt;br /&gt;
		grandchild_templatestyles,&lt;br /&gt;
		hiding_templatestyles,&lt;br /&gt;
		tostring(root),&lt;br /&gt;
		(child and cfg.i18n.category.child or &#039;&#039;),&lt;br /&gt;
		categorizeTemplatesWithInlineStyles(args)&lt;br /&gt;
	})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function list_title(args, is_centered_list_titles, num)&lt;br /&gt;
	&lt;br /&gt;
	local title_text = trimAndAddAutomaticNewline(args[&#039;list&#039; .. num .. &#039;title&#039;]&lt;br /&gt;
		or cfg.i18n.default_list_title)&lt;br /&gt;
&lt;br /&gt;
	local title&lt;br /&gt;
	if is_centered_list_titles then&lt;br /&gt;
		-- collapsible can be finicky, so provide some CSS/HTML to support&lt;br /&gt;
		title = mw.html.create(&#039;div&#039;)&lt;br /&gt;
			:addClass(cfg.i18n.class.list_title_centered)&lt;br /&gt;
			:wikitext(title_text)&lt;br /&gt;
	else&lt;br /&gt;
		title = mw.html.create()&lt;br /&gt;
			:wikitext(title_text)&lt;br /&gt;
	end&lt;br /&gt;
		&lt;br /&gt;
	local title_container = mw.html.create(&#039;div&#039;)&lt;br /&gt;
		:addClass(cfg.i18n.class.list_title)&lt;br /&gt;
		-- don&#039;t /need/ a listnumtitleclass because you can do&lt;br /&gt;
		-- .templateclass .listnumclass .sidebar-list-title&lt;br /&gt;
		:addClass(args.listtitleclass)&lt;br /&gt;
		:cssText(args.basestyle)&lt;br /&gt;
		:cssText(args.listtitlestyle)&lt;br /&gt;
		:cssText(&#039;color: var(--color-base)&#039;)&lt;br /&gt;
		:cssText(args[&#039;list&#039; .. num .. &#039;titlestyle&#039;])&lt;br /&gt;
		:node(title)&lt;br /&gt;
		:done()&lt;br /&gt;
	&lt;br /&gt;
	return title_container&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Main entry point for sidebar with collapsible lists.&lt;br /&gt;
Does the work of creating the collapsible lists themselves and including them&lt;br /&gt;
into the args.&lt;br /&gt;
]]&lt;br /&gt;
function p.collapsible(frame)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	if not args.name and&lt;br /&gt;
		frame:getParent():getTitle():gsub(cfg.i18n.pattern.collapse_sandbox, &#039;&#039;) ==&lt;br /&gt;
		cfg.i18n.collapse_title_not_to_add_navbar then&lt;br /&gt;
		args.navbar = cfg.i18n.navbar_none&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local contentArgs = {}&lt;br /&gt;
	&lt;br /&gt;
	local is_centered_list_titles = false&lt;br /&gt;
	if args[&#039;centered list titles&#039;] and args[&#039;centered list titles&#039;] ~= &#039;&#039; then&lt;br /&gt;
		is_centered_list_titles = true&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		local num = string.match(k, &#039;^list(%d+)$&#039;)&lt;br /&gt;
		if num then&lt;br /&gt;
			local expand = args.expanded and&lt;br /&gt;
				(args.expanded == &#039;all&#039; or args.expanded == args[&#039;list&#039; .. num .. &#039;name&#039;])&lt;br /&gt;
			local row = mw.html.create(&#039;div&#039;)&lt;br /&gt;
			row&lt;br /&gt;
				:addClass(cfg.i18n.class.list)&lt;br /&gt;
				:addClass(&#039;mw-collapsible&#039;)&lt;br /&gt;
				:addClass((not expand) and &#039;mw-collapsed&#039; or nil)&lt;br /&gt;
				:addClass(args[&#039;list&#039; .. num .. &#039;class&#039;])&lt;br /&gt;
				:cssText(args.listframestyle)&lt;br /&gt;
				:cssText(args[&#039;list&#039; .. num .. &#039;framestyle&#039;])&lt;br /&gt;
				:node(list_title(args, is_centered_list_titles, num))&lt;br /&gt;
				:tag(&#039;div&#039;)&lt;br /&gt;
					:addClass(cfg.i18n.class.list_content)&lt;br /&gt;
					:addClass(&#039;mw-collapsible-content&#039;)&lt;br /&gt;
					-- don&#039;t /need/ a listnumstyleclass because you can do&lt;br /&gt;
					-- .templatename .listnumclass .sidebar-list&lt;br /&gt;
					:addClass(args.listclass)&lt;br /&gt;
					:cssText(args.liststyle)&lt;br /&gt;
					:cssText(args[&#039;list&#039; .. num .. &#039;style&#039;])&lt;br /&gt;
					:wikitext(trimAndAddAutomaticNewline(args[&#039;list&#039; .. num]))&lt;br /&gt;
&lt;br /&gt;
			contentArgs[&#039;content&#039; .. num] = tostring(row)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	for k, v in pairs(contentArgs) do&lt;br /&gt;
		args[k] = v&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return p.sidebar(frame, args, cfg.i18n.class.collapse)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Template:Sidebar&amp;diff=6519</id>
		<title>Template:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Template:Sidebar&amp;diff=6519"/>
		<updated>2025-07-31T19:49:34Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;{{#invoke:Sidebar|sidebar}}&amp;lt;noinclude&amp;gt; {{documentation}}&amp;lt;/noinclude&amp;gt;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#invoke:Sidebar|sidebar}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Template:Lua_sidebar&amp;diff=6518</id>
		<title>Template:Lua sidebar</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Template:Lua_sidebar&amp;diff=6518"/>
		<updated>2025-07-31T19:49:13Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;{{Sidebar | class = lua-sidebar | templatestyles = Template:Lua sidebar/styles.css | title = Related pages | content1 = {{plainlist}} * Template {{#if:{{#invoke:redirect|isRedirect|Template talk:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}}}||(talk)}} * Template sandbox * Template:{{{templ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Sidebar&lt;br /&gt;
| class = lua-sidebar&lt;br /&gt;
| templatestyles = Template:Lua sidebar/styles.css&lt;br /&gt;
| title = Related pages&lt;br /&gt;
| content1 = {{plainlist}}&lt;br /&gt;
* [[Template:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}|Template]] {{#if:{{#invoke:redirect|isRedirect|Template talk:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}}}||([[Template talk:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}|talk]])}}&lt;br /&gt;
* [[Template:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}/sandbox|Template sandbox]]&lt;br /&gt;
* [[Template:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}/testcases|Template testcases]]&lt;br /&gt;
* [[Template:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}/doc|Template doc]]&lt;br /&gt;
* [[Special:PrefixIndex/Template:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}/|Template subpages]]&lt;br /&gt;
* [[Module:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}|Module]] {{#if:{{#invoke:redirect|isRedirect|Module talk:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}}}||([[Module talk:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}|talk]])}}&lt;br /&gt;
* [[Module:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}/sandbox|Module sandbox]]&lt;br /&gt;
* [[Module talk:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}/testcases|Module testcases]]&lt;br /&gt;
* [[Module:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}/doc|Module doc]]&lt;br /&gt;
* [[Special:PrefixIndex/Module:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}/|Module subpages]]&lt;br /&gt;
{{endplainlist}}&lt;br /&gt;
| content2 = {{{1|}}}&lt;br /&gt;
}}[[Category:Lua-based templates]]&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Shortcut/doc&amp;diff=6517</id>
		<title>Module:Shortcut/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Shortcut/doc&amp;diff=6517"/>
		<updated>2025-07-31T19:48:50Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;&amp;lt;div style=&amp;quot;text-align: right;&amp;quot;&amp;gt;[[Module:Shortcut/doc]] →&amp;lt;/div&amp;gt;&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
{{Documentation subpages|Module documentation subpages}}&lt;br /&gt;
{{Lua|Module:Shortcut/config|Module:List|Module:Yesno|Module:Arguments}}&lt;br /&gt;
{{Uses TemplateStyles|Module:Shortcut/styles.css}}&lt;br /&gt;
{{Lua sidebar}}&lt;br /&gt;
This module makes a box showing the shortcut links to a page.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
=== From wikitext ===&lt;br /&gt;
&lt;br /&gt;
From wikitext, this module should be called from a template, usually {{tl|shortcut}}. Please see the template page for documentation. However, it can also be called using the syntax &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:shortcut|main|&amp;lt;/nowiki&amp;gt;&#039;&#039;arguments&#039;&#039;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== From Lua ===&lt;br /&gt;
&lt;br /&gt;
To use this module from Lua, first load it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local mShortcut = require(&#039;Module:Shortcut&#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can create shortcut boxes with the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mShortcut._main(shortcuts, options, frame, cfg)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;var&amp;gt;shortcuts&amp;lt;/var&amp;gt; is an array of shortcut page names. (required)&lt;br /&gt;
* &amp;lt;var&amp;gt;options&amp;lt;/var&amp;gt; is a table of options. The following keys are supported:&lt;br /&gt;
** &amp;lt;code&amp;gt;msg&amp;lt;/code&amp;gt; - a message to leave after the list of shortcuts.&lt;br /&gt;
** &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; - if set to false (or a value regarded as false by [[Module:Yesno]], such as &amp;quot;no&amp;quot;), categories are suppressed.&lt;br /&gt;
* &amp;lt;var&amp;gt;frame&amp;lt;/var&amp;gt; is a frame object. This is optional, and only intended to be used internally.&lt;br /&gt;
* &amp;lt;var&amp;gt;cfg&amp;lt;/var&amp;gt; is a table of config values. This is optional, and is only intended for testing.&lt;br /&gt;
&lt;br /&gt;
== Technical details ==&lt;br /&gt;
&lt;br /&gt;
This module has a configuration file at [[Module:Shortcut/config]]. It can be used to translate this module into different languages or to change details like category names.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox||&lt;br /&gt;
&amp;lt;!-- MODULE CATEGORIES --&amp;gt;&lt;br /&gt;
[[Category:Modules]] [[Category:Modules imported from Wikipedia]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;!-- MODULE DOCUMENTATION SUBPAGE CATEGORY --&amp;gt;&lt;br /&gt;
[[Category:Module documentation subpages imported from Wikipedia]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Shortcut/doc&amp;diff=6516</id>
		<title>Module:Shortcut/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Shortcut/doc&amp;diff=6516"/>
		<updated>2025-07-31T19:48:38Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;&amp;lt;div style=&amp;quot;text-align: right;&amp;quot;&amp;gt;[[Module:Shortcut/doc]] →&amp;lt;/div&amp;gt;&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
{{Documentations subpages|Module documentation subpages}}&lt;br /&gt;
{{Lua|Module:Shortcut/config|Module:List|Module:Yesno|Module:Arguments}}&lt;br /&gt;
{{Uses TemplateStyles|Module:Shortcut/styles.css}}&lt;br /&gt;
{{Lua sidebar}}&lt;br /&gt;
This module makes a box showing the shortcut links to a page.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
=== From wikitext ===&lt;br /&gt;
&lt;br /&gt;
From wikitext, this module should be called from a template, usually {{tl|shortcut}}. Please see the template page for documentation. However, it can also be called using the syntax &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:shortcut|main|&amp;lt;/nowiki&amp;gt;&#039;&#039;arguments&#039;&#039;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== From Lua ===&lt;br /&gt;
&lt;br /&gt;
To use this module from Lua, first load it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local mShortcut = require(&#039;Module:Shortcut&#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can create shortcut boxes with the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mShortcut._main(shortcuts, options, frame, cfg)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;var&amp;gt;shortcuts&amp;lt;/var&amp;gt; is an array of shortcut page names. (required)&lt;br /&gt;
* &amp;lt;var&amp;gt;options&amp;lt;/var&amp;gt; is a table of options. The following keys are supported:&lt;br /&gt;
** &amp;lt;code&amp;gt;msg&amp;lt;/code&amp;gt; - a message to leave after the list of shortcuts.&lt;br /&gt;
** &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; - if set to false (or a value regarded as false by [[Module:Yesno]], such as &amp;quot;no&amp;quot;), categories are suppressed.&lt;br /&gt;
* &amp;lt;var&amp;gt;frame&amp;lt;/var&amp;gt; is a frame object. This is optional, and only intended to be used internally.&lt;br /&gt;
* &amp;lt;var&amp;gt;cfg&amp;lt;/var&amp;gt; is a table of config values. This is optional, and is only intended for testing.&lt;br /&gt;
&lt;br /&gt;
== Technical details ==&lt;br /&gt;
&lt;br /&gt;
This module has a configuration file at [[Module:Shortcut/config]]. It can be used to translate this module into different languages or to change details like category names.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox||&lt;br /&gt;
&amp;lt;!-- MODULE CATEGORIES --&amp;gt;&lt;br /&gt;
[[Category:Modules]] [[Category:Modules imported from Wikipedia]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;!-- MODULE DOCUMENTATION SUBPAGE CATEGORY --&amp;gt;&lt;br /&gt;
[[Category:Module documentation subpages imported from Wikipedia]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Template:Shortcut&amp;diff=6515</id>
		<title>Template:Shortcut</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Template:Shortcut&amp;diff=6515"/>
		<updated>2025-07-31T19:45:09Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;&amp;lt;includeonly&amp;gt;{{#invoke:Shortcut|main}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt; {{Documentation}} Category:Templates &amp;lt;/noinclude&amp;gt;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;{{#invoke:Shortcut|main}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
[[Category:Templates]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Category:Template_redirects&amp;diff=6514</id>
		<title>Category:Template redirects</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Category:Template_redirects&amp;diff=6514"/>
		<updated>2025-07-31T19:41:29Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;Category:Redirects&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Redirects]]&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Template:Tl&amp;diff=6513</id>
		<title>Template:Tl</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Template:Tl&amp;diff=6513"/>
		<updated>2025-07-31T19:41:19Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Redirected page to Template:Template link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Template:Template link]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Template redirects]]&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Shortcut/doc&amp;diff=6512</id>
		<title>Module:Shortcut/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Shortcut/doc&amp;diff=6512"/>
		<updated>2025-07-31T19:39:29Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;&amp;lt;div style=&amp;quot;text-align: right;&amp;quot;&amp;gt;[[Module:Shortcut/doc]] →&amp;lt;/div&amp;gt;&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
{{Lua|Module:Shortcut/config|Module:List|Module:Yesno|Module:Arguments}}&lt;br /&gt;
{{Uses TemplateStyles|Module:Shortcut/styles.css}}&lt;br /&gt;
{{Lua sidebar}}&lt;br /&gt;
This module makes a box showing the shortcut links to a page.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
=== From wikitext ===&lt;br /&gt;
&lt;br /&gt;
From wikitext, this module should be called from a template, usually {{tl|shortcut}}. Please see the template page for documentation. However, it can also be called using the syntax &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:shortcut|main|&amp;lt;/nowiki&amp;gt;&#039;&#039;arguments&#039;&#039;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== From Lua ===&lt;br /&gt;
&lt;br /&gt;
To use this module from Lua, first load it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local mShortcut = require(&#039;Module:Shortcut&#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can create shortcut boxes with the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mShortcut._main(shortcuts, options, frame, cfg)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;var&amp;gt;shortcuts&amp;lt;/var&amp;gt; is an array of shortcut page names. (required)&lt;br /&gt;
* &amp;lt;var&amp;gt;options&amp;lt;/var&amp;gt; is a table of options. The following keys are supported:&lt;br /&gt;
** &amp;lt;code&amp;gt;msg&amp;lt;/code&amp;gt; - a message to leave after the list of shortcuts.&lt;br /&gt;
** &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; - if set to false (or a value regarded as false by [[Module:Yesno]], such as &amp;quot;no&amp;quot;), categories are suppressed.&lt;br /&gt;
* &amp;lt;var&amp;gt;frame&amp;lt;/var&amp;gt; is a frame object. This is optional, and only intended to be used internally.&lt;br /&gt;
* &amp;lt;var&amp;gt;cfg&amp;lt;/var&amp;gt; is a table of config values. This is optional, and is only intended for testing.&lt;br /&gt;
&lt;br /&gt;
== Technical details ==&lt;br /&gt;
&lt;br /&gt;
This module has a configuration file at [[Module:Shortcut/config]]. It can be used to translate this module into different languages or to change details like category names.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox||&lt;br /&gt;
&amp;lt;!-- Categories go here and interwikis go in Wikidata. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Shortcut/doc&amp;diff=6511</id>
		<title>Module:Shortcut/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Shortcut/doc&amp;diff=6511"/>
		<updated>2025-07-31T19:38:56Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly style=&amp;quot;text-align: right;&amp;quot;&amp;gt;[[Module:Shortcut/doc]] →&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
{{Lua|Module:Shortcut/config|Module:List|Module:Yesno|Module:Arguments}}&lt;br /&gt;
{{Uses TemplateStyles|Module:Shortcut/styles.css}}&lt;br /&gt;
{{Lua sidebar}}&lt;br /&gt;
This module makes a box showing the shortcut links to a page.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
=== From wikitext ===&lt;br /&gt;
&lt;br /&gt;
From wikitext, this module should be called from a template, usually {{tl|shortcut}}. Please see the template page for documentation. However, it can also be called using the syntax &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:shortcut|main|&amp;lt;/nowiki&amp;gt;&#039;&#039;arguments&#039;&#039;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== From Lua ===&lt;br /&gt;
&lt;br /&gt;
To use this module from Lua, first load it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local mShortcut = require(&#039;Module:Shortcut&#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can create shortcut boxes with the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mShortcut._main(shortcuts, options, frame, cfg)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;var&amp;gt;shortcuts&amp;lt;/var&amp;gt; is an array of shortcut page names. (required)&lt;br /&gt;
* &amp;lt;var&amp;gt;options&amp;lt;/var&amp;gt; is a table of options. The following keys are supported:&lt;br /&gt;
** &amp;lt;code&amp;gt;msg&amp;lt;/code&amp;gt; - a message to leave after the list of shortcuts.&lt;br /&gt;
** &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; - if set to false (or a value regarded as false by [[Module:Yesno]], such as &amp;quot;no&amp;quot;), categories are suppressed.&lt;br /&gt;
* &amp;lt;var&amp;gt;frame&amp;lt;/var&amp;gt; is a frame object. This is optional, and only intended to be used internally.&lt;br /&gt;
* &amp;lt;var&amp;gt;cfg&amp;lt;/var&amp;gt; is a table of config values. This is optional, and is only intended for testing.&lt;br /&gt;
&lt;br /&gt;
== Technical details ==&lt;br /&gt;
&lt;br /&gt;
This module has a configuration file at [[Module:Shortcut/config]]. It can be used to translate this module into different languages or to change details like category names.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox||&lt;br /&gt;
&amp;lt;!-- Categories go here and interwikis go in Wikidata. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Shortcut/config/doc&amp;diff=6510</id>
		<title>Module:Shortcut/config/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Shortcut/config/doc&amp;diff=6510"/>
		<updated>2025-07-31T19:34:37Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;{{Documentation subpage|Module documentation subpage}}&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Documentation subpage|Module documentation subpage}}&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Shortcut/config&amp;diff=6509</id>
		<title>Module:Shortcut/config</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Shortcut/config&amp;diff=6509"/>
		<updated>2025-07-31T19:31:00Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;-- This module holds configuration data for Module:Shortcut.  return {  -- The heading at the top of the shortcut box. It accepts the following parameter: -- $1 - the total number of shortcuts. (required) [&amp;#039;shortcut-heading&amp;#039;] = &amp;#039;Shortcuts}}&amp;#039;,  -- The heading when |redirect=yes is given. It accepts the following parameter: -- $1 - the total number of shortcuts. (required) [&amp;#039;redirect-heading&amp;#039;] = &amp;#039;[[Wikipedia:Redirect|{{PLURAL...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module holds configuration data for [[Module:Shortcut]].&lt;br /&gt;
&lt;br /&gt;
return {&lt;br /&gt;
&lt;br /&gt;
-- The heading at the top of the shortcut box. It accepts the following parameter:&lt;br /&gt;
-- $1 - the total number of shortcuts. (required)&lt;br /&gt;
[&#039;shortcut-heading&#039;] = &#039;[[Wikipedia:Shortcut|{{PLURAL:$1|Shortcut|Shortcuts}}]]&#039;,&lt;br /&gt;
&lt;br /&gt;
-- The heading when |redirect=yes is given. It accepts the following parameter:&lt;br /&gt;
-- $1 - the total number of shortcuts. (required)&lt;br /&gt;
[&#039;redirect-heading&#039;] = &#039;[[Wikipedia:Redirect|{{PLURAL:$1|Redirect|Redirects}}]]&#039;,&lt;br /&gt;
&lt;br /&gt;
-- The error message to display when a shortcut is invalid (is not a string, or&lt;br /&gt;
-- is the blank string). It accepts the following parameter:&lt;br /&gt;
-- $1 - the number of the shortcut in the argument list. (required)&lt;br /&gt;
[&#039;invalid-shortcut-error&#039;] = &#039;shortcut #$1 was invalid (shortcuts must be &#039; ..&lt;br /&gt;
	&#039;strings of at least one character in length)&#039;,&lt;br /&gt;
&lt;br /&gt;
-- The error message to display when no shortcuts or other displayable content&lt;br /&gt;
-- were specified. (required)&lt;br /&gt;
[&#039;no-content-error&#039;] = &#039;Error: no shortcuts were specified and the &#039; ..&lt;br /&gt;
	mw.text.nowiki(&#039;|msg=&#039;) ..&lt;br /&gt;
	&#039; parameter was not set.&#039;,&lt;br /&gt;
&lt;br /&gt;
-- A category to add when the no-content-error message is displayed. (optional)&lt;br /&gt;
[&#039;no-content-error-category&#039;] = &#039;Shortcut templates with missing parameters&#039;,&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Shortcut/doc&amp;diff=6508</id>
		<title>Module:Shortcut/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Shortcut/doc&amp;diff=6508"/>
		<updated>2025-07-31T19:30:03Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;{{Lua|Module:Shortcut/config|Module:List|Module:Yesno|Module:Arguments}} {{Uses TemplateStyles|Module:Shortcut/styles.css}} {{Lua sidebar}} This module makes a box showing the shortcut links to a page.  == Usage ==  === From wikitext ===  From wikitext, this module should be called from a template, usually {{tl|shortcut}}. Please see the template page for documentation. However, it can also be called using the syntax &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:shortcut|main|&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;argum...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lua|Module:Shortcut/config|Module:List|Module:Yesno|Module:Arguments}}&lt;br /&gt;
{{Uses TemplateStyles|Module:Shortcut/styles.css}}&lt;br /&gt;
{{Lua sidebar}}&lt;br /&gt;
This module makes a box showing the shortcut links to a page.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== From wikitext ===&lt;br /&gt;
&lt;br /&gt;
From wikitext, this module should be called from a template, usually {{tl|shortcut}}. Please see the template page for documentation. However, it can also be called using the syntax &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:shortcut|main|&amp;lt;/nowiki&amp;gt;&#039;&#039;arguments&#039;&#039;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== From Lua ===&lt;br /&gt;
&lt;br /&gt;
To use this module from Lua, first load it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local mShortcut = require(&#039;Module:Shortcut&#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can create shortcut boxes with the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mShortcut._main(shortcuts, options, frame, cfg)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;var&amp;gt;shortcuts&amp;lt;/var&amp;gt; is an array of shortcut page names. (required)&lt;br /&gt;
* &amp;lt;var&amp;gt;options&amp;lt;/var&amp;gt; is a table of options. The following keys are supported:&lt;br /&gt;
** &amp;lt;code&amp;gt;msg&amp;lt;/code&amp;gt; - a message to leave after the list of shortcuts.&lt;br /&gt;
** &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; - if set to false (or a value regarded as false by [[Module:Yesno]], such as &amp;quot;no&amp;quot;), categories are suppressed.&lt;br /&gt;
* &amp;lt;var&amp;gt;frame&amp;lt;/var&amp;gt; is a frame object. This is optional, and only intended to be used internally.&lt;br /&gt;
* &amp;lt;var&amp;gt;cfg&amp;lt;/var&amp;gt; is a table of config values. This is optional, and is only intended for testing.&lt;br /&gt;
&lt;br /&gt;
== Technical details ==&lt;br /&gt;
&lt;br /&gt;
This module has a configuration file at [[Module:Shortcut/config]]. It can be used to translate this module into different languages or to change details like category names.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox||&lt;br /&gt;
&amp;lt;!-- Categories go here and interwikis go in Wikidata. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Shortcut&amp;diff=6507</id>
		<title>Module:Shortcut</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Shortcut&amp;diff=6507"/>
		<updated>2025-07-31T19:29:44Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Imported from Wikipedia.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements {{shortcut}}.&lt;br /&gt;
&lt;br /&gt;
-- Set constants&lt;br /&gt;
local CONFIG_MODULE = &#039;Module:Shortcut/config&#039;&lt;br /&gt;
&lt;br /&gt;
-- Load required modules&lt;br /&gt;
local checkType = require(&#039;libraryUtil&#039;).checkType&lt;br /&gt;
local yesno = require(&#039;Module:Yesno&#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function message(msg, ...)&lt;br /&gt;
	return mw.message.newRawMessage(msg, ...):plain()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function makeCategoryLink(cat)&lt;br /&gt;
	return string.format(&#039;[[%s:%s]]&#039;, mw.site.namespaces[14].name, cat)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(shortcuts, options, frame, cfg)&lt;br /&gt;
	checkType(&#039;_main&#039;, 1, shortcuts, &#039;table&#039;)&lt;br /&gt;
	checkType(&#039;_main&#039;, 2, options, &#039;table&#039;, true)&lt;br /&gt;
	options = options or {}&lt;br /&gt;
	frame = frame or mw.getCurrentFrame()&lt;br /&gt;
	cfg = cfg or mw.loadData(CONFIG_MODULE)&lt;br /&gt;
	local templateMode = options.template and yesno(options.template)&lt;br /&gt;
	local redirectMode = options.redirect and yesno(options.redirect)&lt;br /&gt;
	local isCategorized = not options.category or yesno(options.category) ~= false&lt;br /&gt;
&lt;br /&gt;
	-- Validate shortcuts&lt;br /&gt;
	for i, shortcut in ipairs(shortcuts) do&lt;br /&gt;
		if type(shortcut) ~= &#039;string&#039; or #shortcut &amp;lt; 1 then&lt;br /&gt;
			error(message(cfg[&#039;invalid-shortcut-error&#039;], i), 2)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Make the list items. These are the shortcuts plus any extra lines such&lt;br /&gt;
	-- as options.msg.&lt;br /&gt;
	local listItems = {}&lt;br /&gt;
	for i, shortcut in ipairs(shortcuts) do&lt;br /&gt;
		local templatePath, prefix&lt;br /&gt;
		if templateMode then&lt;br /&gt;
			-- Namespace detection&lt;br /&gt;
			local titleObj = mw.title.new(shortcut, 10)&lt;br /&gt;
			if titleObj.namespace == 10 then&lt;br /&gt;
				templatePath = titleObj.fullText&lt;br /&gt;
			else&lt;br /&gt;
				templatePath = shortcut&lt;br /&gt;
			end&lt;br /&gt;
			prefix = options[&#039;pre&#039; .. i] or options.pre or &#039;&#039;&lt;br /&gt;
		end&lt;br /&gt;
		if options.target and yesno(options.target) then&lt;br /&gt;
			listItems[i] = templateMode&lt;br /&gt;
				and string.format(&amp;quot;&amp;amp;#123;&amp;amp;#123;%s[[%s|%s]]&amp;amp;#125;&amp;amp;#125;&amp;quot;, prefix, templatePath, shortcut)&lt;br /&gt;
				or string.format(&amp;quot;[[%s]]&amp;quot;, shortcut)&lt;br /&gt;
		else&lt;br /&gt;
			listItems[i] = frame:expandTemplate{&lt;br /&gt;
				title = &#039;No redirect&#039;,&lt;br /&gt;
				args = templateMode and {templatePath, shortcut} or {shortcut, shortcut}&lt;br /&gt;
			}&lt;br /&gt;
			if templateMode then&lt;br /&gt;
				listItems[i] = string.format(&amp;quot;&amp;amp;#123;&amp;amp;#123;%s%s&amp;amp;#125;&amp;amp;#125;&amp;quot;, prefix, listItems[i])&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	table.insert(listItems, options.msg)&lt;br /&gt;
&lt;br /&gt;
	-- Return an error if we have nothing to display&lt;br /&gt;
	if #listItems &amp;lt; 1 then&lt;br /&gt;
		local msg = cfg[&#039;no-content-error&#039;]&lt;br /&gt;
		msg = string.format(&#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;%s&amp;lt;/strong&amp;gt;&#039;, msg)&lt;br /&gt;
		if isCategorized and cfg[&#039;no-content-error-category&#039;] then&lt;br /&gt;
			msg = msg .. makeCategoryLink(cfg[&#039;no-content-error-category&#039;])&lt;br /&gt;
		end&lt;br /&gt;
		return msg&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local root = mw.html.create()&lt;br /&gt;
	root:wikitext(frame:extensionTag{ name = &#039;templatestyles&#039;, args = { src = &#039;Module:Shortcut/styles.css&#039;} })&lt;br /&gt;
	-- Anchors&lt;br /&gt;
	local anchorDiv = root&lt;br /&gt;
		:tag(&#039;div&#039;)&lt;br /&gt;
			:addClass(&#039;module-shortcutanchordiv&#039;)&lt;br /&gt;
	for i, shortcut in ipairs(shortcuts) do&lt;br /&gt;
		local anchor = mw.uri.anchorEncode(shortcut)&lt;br /&gt;
		anchorDiv:tag(&#039;span&#039;):attr(&#039;id&#039;, anchor)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Shortcut heading&lt;br /&gt;
	local shortcutHeading&lt;br /&gt;
	do&lt;br /&gt;
		local nShortcuts = #shortcuts&lt;br /&gt;
		if nShortcuts &amp;gt; 0 then&lt;br /&gt;
			local headingMsg = options[&#039;shortcut-heading&#039;] or&lt;br /&gt;
				redirectMode and cfg[&#039;redirect-heading&#039;] or&lt;br /&gt;
				cfg[&#039;shortcut-heading&#039;]&lt;br /&gt;
			shortcutHeading = message(headingMsg, nShortcuts)&lt;br /&gt;
			shortcutHeading = frame:preprocess(shortcutHeading)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Shortcut box&lt;br /&gt;
	local shortcutList = root&lt;br /&gt;
		:tag(&#039;div&#039;)&lt;br /&gt;
			:addClass(&#039;module-shortcutboxplain noprint&#039;)&lt;br /&gt;
			:attr(&#039;role&#039;, &#039;note&#039;)&lt;br /&gt;
	if options.float and options.float:lower() == &#039;left&#039; then&lt;br /&gt;
		shortcutList:addClass(&#039;module-shortcutboxleft&#039;)&lt;br /&gt;
	end&lt;br /&gt;
	if options.clear and options.clear ~= &#039;&#039; then&lt;br /&gt;
		shortcutList:css(&#039;clear&#039;, options.clear)&lt;br /&gt;
	end&lt;br /&gt;
	if shortcutHeading then&lt;br /&gt;
		shortcutList&lt;br /&gt;
			:tag(&#039;div&#039;)&lt;br /&gt;
				:addClass(&#039;module-shortcutlist&#039;)&lt;br /&gt;
				:wikitext(shortcutHeading)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local ubl = require(&#039;Module:List&#039;).unbulleted(listItems)&lt;br /&gt;
	shortcutList:wikitext(ubl)&lt;br /&gt;
	return tostring(root)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = require(&#039;Module:Arguments&#039;).getArgs(frame)&lt;br /&gt;
&lt;br /&gt;
	-- Separate shortcuts from options&lt;br /&gt;
	local shortcuts, options = {}, {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		if type(k) == &#039;number&#039; then&lt;br /&gt;
			shortcuts[k] = v&lt;br /&gt;
		else&lt;br /&gt;
			options[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Compress the shortcut array, which may contain nils.&lt;br /&gt;
	local function compressArray(t)&lt;br /&gt;
		local nums, ret = {}, {}&lt;br /&gt;
		for k in pairs(t) do&lt;br /&gt;
			nums[#nums + 1] = k&lt;br /&gt;
		end&lt;br /&gt;
		table.sort(nums)&lt;br /&gt;
		for i, num in ipairs(nums) do&lt;br /&gt;
			ret[i] = t[num]&lt;br /&gt;
		end&lt;br /&gt;
		return ret&lt;br /&gt;
	end&lt;br /&gt;
	shortcuts = compressArray(shortcuts)&lt;br /&gt;
&lt;br /&gt;
	return p._main(shortcuts, options, frame)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Params/doc&amp;diff=6506</id>
		<title>Module:Params/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Params/doc&amp;diff=6506"/>
		<updated>2025-07-31T19:28:29Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;The &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params}}&amp;lt;/syntaxhighlight&amp;gt; module is designed to be adopted by those templates that want to have a deep control of their parameters. It is particularly useful to variadic templates, to which it offers the possibility to count, list, map and propagate the parameters received without knowing their number in advance.  The module offers elegant shortcuts to non variadic templates as well. O...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params}}&amp;lt;/syntaxhighlight&amp;gt; module is designed to be adopted by those templates that want to have a deep control of their parameters. It is particularly useful to [[wikipedia:variadic template|variadic template]]s, to which it offers the possibility to count, list, map and propagate the parameters received without knowing their number in advance.&lt;br /&gt;
&lt;br /&gt;
The module offers elegant shortcuts to non variadic templates as well. Outside templates it has virtually no applications; hence, if you plan to make experiments, make sure to do them from within a template, or you will not be able to see much (you can use {{tl|Template sandbox}} for that). Under {{rel|Module:Params/testcases}} you can find helper templates that can be specifically used for testing the module&#039;s capabilities in flexible ways. Finally, under {{rel|Module:Params/doc/examples}} you can find some of the examples shown in this documentation page.&lt;br /&gt;
&lt;br /&gt;
{{A note}} In case your template uses &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params}}&amp;lt;/syntaxhighlight&amp;gt;, please add {{tji|lua|Module&amp;amp;#58;Params}} to its documentation page, so that if breaking changes will be introduced in the future the template will be easily traceable without performing &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[//en.wikipedia.org/w/index.php?search=insource%3A%2Finvoke%3Aparams%2Fi&amp;amp;title=Special%3ASearch&amp;amp;profile=advanced&amp;amp;fulltext=1&amp;amp;ns10=1&amp;amp;limit=500&amp;amp;sort=last_edit_desc an “in source” search]&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Please, do not edit this module without having done extensive testing in the [[Module:Params/sandbox|module&#039;s sandbox]] first.&lt;br /&gt;
&lt;br /&gt;
== General usage ==&lt;br /&gt;
Among the possibilities that the module offers there is that of performing a series of actions after novel arguments have been concatenated to templates&#039; incoming parameters. As this makes it necessary to keep the argument slots clean from interference, instead of named arguments in order to specify options this module uses &#039;&#039;piping functions&#039;&#039; (i.e. functions that expect to be [[Pipeline (software)|piped]] instead of returning to the caller), or &#039;&#039;modifiers&#039;&#039;. This creates a syntax similar to the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|[modifier]|[...]|[modifier]|[...]|function|[...]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For instance, as the name suggests, the &amp;lt;code&amp;gt;[[#list|list]]&amp;lt;/code&amp;gt; function lists the parameters wherewith a template was called. By default it does not add delimiters, but returns an indistinct blob of text in which keys and values are sticked to each other. However, by using the &amp;lt;code&amp;gt;[[#setting|setting]]&amp;lt;/code&amp;gt; modifier, we are able to declare a key-value delimiter (&amp;lt;code&amp;gt;p&amp;lt;/code&amp;gt;) and an iteration delimiter (&amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;). And so, if we imagined a template named &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template}}&amp;lt;/syntaxhighlight&amp;gt; containing the following wikitext,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|setting|i/p|&amp;lt;br /&amp;gt;|: |list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and such template were called with the following parameters,&lt;br /&gt;
&lt;br /&gt;
{{tj|example template|Beast of Bodmin: A large feline inhabiting Bodmin Moor&lt;br /&gt;
  |Morgawr: A sea serpent|Owlman: A giant owl-like creature}}&lt;br /&gt;
&lt;br /&gt;
the following result would be produced:&lt;br /&gt;
&lt;br /&gt;
: Beast of Bodmin: A large feline inhabiting Bodmin Moor&amp;lt;br /&amp;gt;Morgawr: A sea serpent&amp;lt;br /&amp;gt;Owlman: A giant owl-like creature&lt;br /&gt;
&lt;br /&gt;
We can also do more sophisticated things; for instance, by exploiting the possibility to set a header (&amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;) and a footer (&amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;), we can transform the previous code into a generator of [https://html.spec.whatwg.org/multipage/grouping-content.html#the-dl-element definition lists],&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|setting|h/p/i/f|&amp;lt;dl&amp;gt;&amp;lt;dt&amp;gt;|&amp;lt;/dt&amp;gt;&amp;lt;dd&amp;gt;|&amp;lt;/dd&amp;gt;&amp;lt;dt&amp;gt;|&amp;lt;/dd&amp;gt;&amp;lt;/dl&amp;gt;|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
thus yielding:&lt;br /&gt;
&lt;br /&gt;
:; Beast of Bodmin&lt;br /&gt;
:: A large feline inhabiting Bodmin Moor&lt;br /&gt;
:; Morgawr&lt;br /&gt;
:: A sea serpent&lt;br /&gt;
:; Owlman&lt;br /&gt;
:: A giant owl-like creature&lt;br /&gt;
&lt;br /&gt;
By placing the &amp;lt;code&amp;gt;[[#with_name_matching|with_name_matching]]&amp;lt;/code&amp;gt; modifier before the &amp;lt;code&amp;gt;[[#list|list]]&amp;lt;/code&amp;gt; function we will be able to filter some parameters out – such as, for instance, all parameter names that do not end with an “n”:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|with_name_matching|n$|setting|h/p/i/f|&amp;lt;dl&amp;gt;&amp;lt;dt&amp;gt;|&amp;lt;/dt&amp;gt;&amp;lt;dd&amp;gt;|&amp;lt;/dd&amp;gt;&amp;lt;dt&amp;gt;|&amp;lt;/dd&amp;gt;&amp;lt;/dl&amp;gt;|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the previous code will produce:&lt;br /&gt;
&lt;br /&gt;
:; Beast of Bodmin&lt;br /&gt;
:: A large feline inhabiting Bodmin Moor&lt;br /&gt;
:; Owlman&lt;br /&gt;
:: A giant owl-like creature&lt;br /&gt;
&lt;br /&gt;
This mechanism has the intrinsic advantage that it allows concatenating infinite modifiers. And so, in order to get the accurate result that we want to obtain we could write:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|non-sequential|with_name_matching|^B|with_name_matching|n$|with_value_matching|feline|setting|h/p/i/f|&amp;lt;dl&amp;gt;&amp;lt;dt&amp;gt;|&amp;lt;/dt&amp;gt;&amp;lt;dd&amp;gt;|&amp;lt;/dd&amp;gt;&amp;lt;dt&amp;gt;|&amp;lt;/dd&amp;gt;&amp;lt;/dl&amp;gt;|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The two modifiers &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[#non-sequential|non-sequential]]&amp;lt;/code&amp;gt; refer to a technical jargon used in wikitext: given a parameter list, the subgroup of sequential parameters is constituted by the largest group of consecutive numeric parameters starting from {{tjp|1:}} – this is known as the parameters&#039; “sequence”. A parameter list that does not have a first parameter specified does not possess a sequence.&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
&lt;br /&gt;
Here follows the list of functions. You might want to see also [[#Modifiers (piping functions)|§ Modifiers]].&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;self&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;self&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|self|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label3 = Not affected by | data3 = Any modifier&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;&amp;amp;#123;&amp;amp;#123;[[:mw:Help:Magic words#FULLPAGENAME|FULLPAGENAME]]&amp;amp;#125;&amp;amp;#125;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Return the name of the current template&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|self}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This argumentless function guarantees that the name of the template invoking this module is shown, regardless if this is transcluded or not.&lt;br /&gt;
&lt;br /&gt;
As a possible example, if a Wikipedia page named &amp;lt;code&amp;gt;Page X&amp;lt;/code&amp;gt; contained only a transclusion of a template named &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{foobar}}&amp;lt;/syntaxhighlight&amp;gt;, and the latter contained the following wikitext,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|self}}&lt;br /&gt;
&lt;br /&gt;
{{FULLPAGENAME}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if we visited &amp;lt;code&amp;gt;Template:Foobar&amp;lt;/code&amp;gt; we would see,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Template:Foobar&lt;br /&gt;
&lt;br /&gt;
Template:Foobar&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
whereas if we visited &amp;lt;code&amp;gt;Page X&amp;lt;/code&amp;gt; we would see:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Template:Foobar&lt;br /&gt;
&lt;br /&gt;
Page X&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore by writing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#ifeq:{{#invoke:params|self}}|{{FULLPAGENAME}}&lt;br /&gt;
	|Page is not being transcluded&lt;br /&gt;
	|Page is being transcluded&lt;br /&gt;
}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
it is possible to understand whether a page is being transcluded or not. For most cases the {{tag|includeonly}} and {{tag|noinclude}} will offer a simpler solution, however there can be cases in which this becomes the way to go.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;Page X&amp;lt;/code&amp;gt; transcluded &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{foobar 2}}&amp;lt;/syntaxhighlight&amp;gt; and the latter were a redirect to &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{foobar}}&amp;lt;/syntaxhighlight&amp;gt;, we would still see&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Template:Foobar&lt;br /&gt;
&lt;br /&gt;
Page X&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A typical use case of this function is that of providing stable links for editing transcluded templates. E.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{edit|{{#invoke:params|self}}|edit this template}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another possible use case is that of transcluding a subtemplate. E.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{{{#invoke:params|self}}/my subtemplate|foo|bar}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;count&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;count&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|count|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Often preceeded by | data2 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| label3 = Not affected by | data3 = &amp;lt;code&amp;gt;[[#all_sorted|all_sorted]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reassorted|reassorted]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#setting|setting]]&amp;lt;/code&amp;gt;,&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;[[#sorting_sequential_values|sorting_sequential_val…]]&amp;lt;/code&amp;gt;,&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_replacing|mapping_by_replacing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = {{mlx|ParameterCount|}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Count the number of parameters wherewith a template was called&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|count}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function does not take arguments.&lt;br /&gt;
&lt;br /&gt;
The number that this function yields depends on the modifiers that precede it. For instance, in a template that is called with both named and unnamed parameters,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|count}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|sequential|count}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will return different results.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;concat_and_call&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;concat_and_call&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|concat_and_call|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = Not affected by | data2 = &amp;lt;code&amp;gt;[[#all_sorted|all_sorted]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reassorted|reassorted]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#combining_by_calling|combining_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#concat_and_invoke|concat_and_invoke]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#concat_and_magic|concat_and_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{mfl|template wrapper|wrap}}&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Prepend positive numeric arguments to the current parameters, or impose non-numeric or negative numeric arguments, then propagate everything to a custom template&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|concat_and_call|template name|[prepend 1]|[prepend 2]|[...]|[prepend n]|[named item 1=value 1]|[...]|[named item n=value n]|[...]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function comes in handy in case of [[Wikipedia:Wrapper templates|wrapper templates]]. For example, if our &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{wrapper template}}&amp;lt;/syntaxhighlight&amp;gt; had the following code,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|concat_and_call|foobar|elbow|earth|room|7=classy|hello=not today}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and were called with,&lt;br /&gt;
&lt;br /&gt;
{{tj|wrapper template|one|two|three|hello: world|wind: spicy}}&lt;br /&gt;
&lt;br /&gt;
the following call to the &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{foobar}}&amp;lt;/syntaxhighlight&amp;gt; template would be performed:&lt;br /&gt;
&lt;br /&gt;
{{tj|foobar|elbow|earth|room|7: classy|8: one|9: two|10: three&lt;br /&gt;
  |wind: spicy|hello: not today}}&lt;br /&gt;
&lt;br /&gt;
By using the &amp;lt;code&amp;gt;[[#cutting|cutting]]&amp;lt;/code&amp;gt; modifier it is possible to impose numeric positive parameters instead of prepending them. For instance, the following code echoes all incoming parameters to &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{my template}}&amp;lt;/syntaxhighlight&amp;gt;, with the exception of {{para|3}}, which is replaced with &amp;lt;code&amp;gt;hello world&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|cutting|3|0|concat_and_call|my template|{{{1|}}}|{{{2|}}}|hello world}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the numeric parameters to replace are a limited number, as in the example above, a better alternative might be that of using &amp;lt;code&amp;gt;[[#imposing|imposing]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If no other argument besides the &#039;&#039;template name&#039;&#039; is provided this function simply echoes the current parameters to another template.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this function except the &#039;&#039;template name&#039;&#039; will not be trimmed of their leading and trailing spaces. The &amp;lt;code&amp;gt;concat_and_call&amp;lt;/code&amp;gt; &#039;&#039;function name&#039;&#039; itself, however, will be trimmed of its surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;concat_and_invoke&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;concat_and_invoke&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|concat_and_invoke|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = Not affected by | data2 = &amp;lt;code&amp;gt;[[#all_sorted|all_sorted]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reassorted|reassorted]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#concat_and_call|concat_and_call]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#concat_and_magic|concat_and_magic]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Prepend positive numeric arguments to the current parameters, or impose non-numeric or negative numeric arguments, then propagate everything to a custom module&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|concat_and_invoke|module name|function name|[prepend 1]|[prepend 2]|[...]|[prepend n]|[named item 1=value 1]|[...]|[named item n=value n]|[...]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exactly like &amp;lt;code&amp;gt;[[#concat_and_call|concat_and_call]]&amp;lt;/code&amp;gt;, but invokes a module instead of calling a template.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this function except the &#039;&#039;module name&#039;&#039; and the &#039;&#039;function name&#039;&#039; will not be trimmed of their leading and trailing spaces. The &amp;lt;code&amp;gt;concat_and_invoke&amp;lt;/code&amp;gt; &#039;&#039;function name&#039;&#039; itself, however, will be trimmed of its surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;concat_and_magic&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;concat_and_magic&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|concat_and_magic|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = Not affected by | data2 = &amp;lt;code&amp;gt;[[#all_sorted|all_sorted]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reassorted|reassorted]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#concat_and_call|concat_and_call]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#concat_and_invoke|concat_and_invoke]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Prepend positive numeric arguments to the current parameters, or impose non-numeric or negative numeric arguments, then propagate everything to a custom parser function&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|concat_and_magic|parser function|[prepend 1]|[prepend 2]|[...]|[prepend n]|[named item 1=value 1]|[...]|[named item n=value n]|[...]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exactly like &amp;lt;code&amp;gt;[[#concat_and_call|concat_and_call]]&amp;lt;/code&amp;gt;, but calls a [[:mw:Help:Magic words#Parser functions|parser function]] instead of a template.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this function except the magic word will not be trimmed of their leading and trailing spaces. The &amp;lt;code&amp;gt;concat_and_magic&amp;lt;/code&amp;gt; &#039;&#039;function name&#039;&#039; itself, however, will be trimmed of its surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;value_of&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;value_of&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|value_of|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 1&lt;br /&gt;
| label2 = Relevant [[#setting|function-only variables]] | data2 = &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;&lt;br /&gt;
| label3 = Not affected by | data3 = &amp;lt;code&amp;gt;[[#all_sorted|all_sorted]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reassorted|reassorted]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#list_values|list_values]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#coins|coins]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#unique_coins|unique_coins]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Get the value of a single parameter&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|value_of|parameter name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Without modifiers this function is similar to writing &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{{parameter name|}}}&amp;lt;/syntaxhighlight&amp;gt;. With modifiers, however, it allows reaching parameters that would be unreachable without knowing their number in advance. For instance, writing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|cutting|-2|0|value_of|1}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will expand to the value of the second-last sequential parameter, independently of how many parameters the template was called with. If no matching parameter is found this function expands to nothing. A header (&amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;), a footer (&amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;), and a fallback text (&amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;) can be declared via the &amp;lt;code&amp;gt;[[#setting|setting]]&amp;lt;/code&amp;gt; modifier – the strings assigned to the key-value pair delimiter (&amp;lt;code&amp;gt;p&amp;lt;/code&amp;gt;), the iteration delimiter (&amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;) and the last iteration delimiter (&amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;) will be ignored.&lt;br /&gt;
&lt;br /&gt;
For instance, the {{Tl|If then show}} template could be rewritten as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|with_value_not_matching|^%s*$|setting|h/f/n|{{{3|}}}|{{{4|}}}|{{{2|}}}|value_of|1}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Simplifying, the following wikitext expands to the first parameter that is not empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|with_value_not_matching||strict|squeezing|value_of|1}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Whereas the following wikitext expands to the first parameter that is not blank (i.e. neither empty nor containing only [[whitespace]]s)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|with_value_not_matching|^%s*$|squeezing|value_of|1}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|list|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = [[#all_sorted|Sortable]] | data2 = Yes&lt;br /&gt;
| label3 = Relevant [[#setting|function-only variables]] | data3 = &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;p&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#list_values|list_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;List the template parameters (both their names and their values)&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function does not take arguments.&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;code&amp;gt;[[#setting|setting]]&amp;lt;/code&amp;gt; modifier was not placed earlier, this function will not add delimiters, but will return an indistinct blob of text in which keys and values are sticked to each other. A header (&amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;), a key-value pair delimiter (&amp;lt;code&amp;gt;p&amp;lt;/code&amp;gt;), an iteration delimiter (&amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;), a last iteration delimiter (&amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;), a footer (&amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;), and a fallback text (&amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;) can be declared via &amp;lt;code&amp;gt;[[#setting|setting]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example, the following code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|setting|h/i/p/f/n|&#039;&#039;&#039;Parameters passed:&#039;&#039;&#039; |); | (|)|&#039;&#039;&#039;No parameters were passed&#039;&#039;&#039;|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will generate an output similar to the following.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;&#039;Parameters passed:&#039;&#039;&#039; Owlman (A giant owl-like creature); Beast of Bodmin (A large feline inhabiting Bodmin Moor); Morgawr (A sea serpent)&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;list_values&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;list_values&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|list_values|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = [[#all_sorted|Sortable]] | data2 = Yes&lt;br /&gt;
| label3 = Often preceeded by | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| label4 = Relevant [[#setting|function-only variables]] | data4 = &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;&lt;br /&gt;
| header5 = See also&lt;br /&gt;
| data6 = &amp;lt;code&amp;gt;[[#list|list]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#value_of|value_of]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#coins|coins]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#unique_coins|unique_coins]]&amp;lt;/code&amp;gt;, {{mlx|separated entries|}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;List the values of the incoming parameters&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|list_values}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function does not take arguments.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt; modifier often accompanies this function. If the &amp;lt;code&amp;gt;[[#setting|setting]]&amp;lt;/code&amp;gt; modifier was not placed earlier, this function will not add delimiters, but will return an indistinct blob of text in which values are sticked to each other. A header (&amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;), an iteration delimiter (&amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;), a last iteration delimiter (&amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;), a footer (&amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;), and a fallback text (&amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;) can be declared via &amp;lt;code&amp;gt;[[#setting|setting]]&amp;lt;/code&amp;gt; – the string assigned to the key-value pair delimiter (&amp;lt;code&amp;gt;p&amp;lt;/code&amp;gt;) will be ignored.&lt;br /&gt;
&lt;br /&gt;
For example, the following code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|setting|h/i/p/f/n|&#039;&#039;&#039;Parameters passed:&#039;&#039;&#039; |); | (|)|&#039;&#039;&#039;No parameters were passed&#039;&#039;&#039;|list_values}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will generate an output similar to the following.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;&#039;Values of parameters passed:&#039;&#039;&#039; A giant owl-like creature; A large feline inhabiting Bodmin Moor; A sea serpent.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;coins&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;coins&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|coins|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = [[#all_sorted|Sortable]] | data2 = Yes&lt;br /&gt;
| label3 = Often preceeded by | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#trimming_values|trimming_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| label4 = Relevant [[#setting|function-only variables]] | data4 = &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;&lt;br /&gt;
| header5 = See also&lt;br /&gt;
| data6 = &amp;lt;code&amp;gt;[[#unique_coins|unique_coins]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#list|list]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#value_of|value_of]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Associate custom strings to possible parameter values and list the custom string when the associated value is present&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|coins|[first coin = value 1]|[second coin = value 2]|[...]|[last coin = value N]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function is identical to the &amp;lt;code&amp;gt;[[#unique_coins|unique_coins]]&amp;lt;/code&amp;gt; function, except that it allows the repetition of identical flags. See there for more information.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;unique_coins&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;unique_coins&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|unique_coins|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = [[#all_sorted|Sortable]] | data2 = Yes&lt;br /&gt;
| label3 = Often preceeded by | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#trimming_values|trimming_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| label4 = Relevant [[#setting|function-only variables]] | data4 = &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;&lt;br /&gt;
| header5 = See also&lt;br /&gt;
| data6 = &amp;lt;code&amp;gt;[[#coins|coins]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#list|list]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#value_of|value_of]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Associate custom strings to possible parameter values and list the custom string when the associated value is present, but not more than once&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|unique_coins|[first coin = value 1]|[second coin = value 2]|[...]|[last coin = value N]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function is used to detect the existence of flag parameters. For this reason, it is often accompanied by the &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt; modifier (or, equivalently, by &amp;lt;code&amp;gt;...&amp;amp;#124;[[#excluding_non-numeric_names|excluding_non-numeric_names]]&amp;amp;#124;[[#clearing|clearing]]&amp;amp;#124;...&amp;lt;/code&amp;gt;). For a similar function that allows the repetition of identical flags, see the &amp;lt;code&amp;gt;[[#coins|coins]]&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
A typical use case of this function is that of constructing [[URL]]s. For example, the following template named &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template}}&amp;lt;/syntaxhighlight&amp;gt; checks for the &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;xml&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;comments&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;removenowiki&amp;lt;/code&amp;gt; flags in order to append respectively the following strings to the final URL: &amp;lt;code&amp;gt;&amp;amp;amp;wpGenerateRawHtml=1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;amp;wpGenerateXml=1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;amp;wpRemoveComments=0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;amp;wpRemoveNowiki=1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#if:{{{input|}}}&lt;br /&gt;
	| &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[{{fullurl:Special:ExpandTemplates|wpInput={{urlencode:{{{input}}}|QUERY}}{{#if:{{{title|}}}|&amp;amp;wpContextTitle={{urlencode|{{{title}}}|QUERY}}}}{{#invoke:params|excluding_non-numeric_names|clearing|sequential|trimming_values|unique_coins&lt;br /&gt;
		| html = &amp;amp;wpGenerateRawHtml=1&lt;br /&gt;
		| xml = &amp;amp;wpGenerateXml=1&lt;br /&gt;
		| comments = &amp;amp;wpRemoveComments=0&lt;br /&gt;
		| removenowiki = &amp;amp;wpRemoveNowiki=1&lt;br /&gt;
	}}}} {{#if:{{{label|}}}|{{{label|}}}|Expand &amp;lt;code&amp;gt;{{{input}}}&amp;lt;/code&amp;gt;}}]&amp;lt;/span&amp;gt;&lt;br /&gt;
	| {{Error|Error: The {{para|input}} parameter is missing.}}&lt;br /&gt;
}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And so, when transcluded as,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{example template|comments|xml&lt;br /&gt;
	| input = Hello world {&amp;lt;nowiki /&amp;gt;{#time:r{{!}}now}&amp;lt;nowiki /&amp;gt;}&lt;br /&gt;
}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
it will generate the following output:&lt;br /&gt;
&lt;br /&gt;
: {{module:params/doc/examples/link to expanded template|comments|xml&lt;br /&gt;
	| input = Hello world {&amp;lt;nowiki /&amp;gt;{#time:r{{!}}now}&amp;lt;nowiki /&amp;gt;}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
A copy of the example above is available at &amp;amp;#123;&amp;amp;#123;{{rel|Module:Params/doc/examples/link to expanded template}}&amp;amp;#125;&amp;amp;#125;.&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;code&amp;gt;[[#setting|setting]]&amp;lt;/code&amp;gt; modifier was not placed earlier, this function will not add delimiters, but will return an indistinct blob of text in which values are sticked to each other. A header (&amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;), an iteration delimiter (&amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;), a last iteration delimiter (&amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;), a footer (&amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;), and a fallback text (&amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;) can be declared via &amp;lt;code&amp;gt;[[#setting|setting]]&amp;lt;/code&amp;gt; – the string assigned to the key-value pair delimiter (&amp;lt;code&amp;gt;p&amp;lt;/code&amp;gt;) will be ignored.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;call_for_each&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;call_for_each&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|call_for_each|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = [[#all_sorted|Sortable]] | data2 = Yes&lt;br /&gt;
| label3 = Relevant [[#setting|function-only variables]] | data3 = &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#call_for_each_value|call_for_each_value]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#invoke_for_each|invoke_for_each]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#magic_for_each|magic_for_each]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#call_for_each_group|call_for_each_group]]&amp;lt;/code&amp;gt;, {{mlx|for loop|}}, {{tl2|for loop}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;For each parameter passed to the current template, call a custom template with at least two parameters (key and value)&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|call_for_each|template name|[append 1]|[append 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param n=value n]|[...]&lt;br /&gt;
}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some functions are like shortcuts. The &amp;lt;code&amp;gt;X_for_each|F&amp;lt;/code&amp;gt; functions are similar to &amp;lt;code&amp;gt;mapping_by_X(ing)|F|(names_and_values|)list_values&amp;lt;/code&amp;gt;. The latter syntax (i.e. the modifier version) allows a &amp;lt;code&amp;gt;values_and_names&amp;lt;/code&amp;gt; flag to invert the order from key-value to value-key.&lt;br /&gt;
&lt;br /&gt;
All unnamed arguments following the &#039;&#039;template name&#039;&#039; will be placed after the key-value pair. Named arguments will be passed verbatim. A header (&amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;), an iteration delimiter (&amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;), a last iteration delimiter (&amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;), a footer (&amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;), and a fallback text (&amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;) can be declared via the &amp;lt;code&amp;gt;[[#setting|setting]]&amp;lt;/code&amp;gt; modifier – the string assigned to the key-value pair delimiter (&amp;lt;code&amp;gt;p&amp;lt;/code&amp;gt;) will be ignored.&lt;br /&gt;
&lt;br /&gt;
Calling a template for each key-value pair with&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sequential|call_for_each|foobar}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will be different from writing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sequential|for_each|{{foobar|$#|$@}}}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the first example each key-value pair will be passed to the &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{foobar}}&amp;lt;/syntaxhighlight&amp;gt; template, while in the second example the &amp;lt;code&amp;gt;$#&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$@&amp;lt;/code&amp;gt; tokens will be expanded &#039;&#039;after&#039;&#039; the &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{foobar}}&amp;lt;/syntaxhighlight&amp;gt; template has been called. In most cases this will make no difference, however there are several situations where it will lead to nonsensical results.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this function except the &#039;&#039;template name&#039;&#039; will not be trimmed of their leading and trailing spaces. The &amp;lt;code&amp;gt;call_for_each&amp;lt;/code&amp;gt; &#039;&#039;function name&#039;&#039; itself, however, will be trimmed of its surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;invoke_for_each&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;invoke_for_each&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|invoke_for_each|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = [[#all_sorted|Sortable]] | data2 = Yes&lt;br /&gt;
| label3 = Relevant [[#setting|function-only variables]] | data3 = &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#invoke_for_each_value|invoke_for_each_value]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#call_for_each|call_for_each]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#magic_for_each|magic_for_each]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;For each parameter passed to the current template, invoke a custom module function with at least two arguments (key and value)&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|invoke_for_each|module name|module function|[append 1]|[append 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param n=value n]|[...]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exactly like &amp;lt;code&amp;gt;[[#call_for_each|call_for_each]]&amp;lt;/code&amp;gt;, but invokes a module instead of calling a template.&lt;br /&gt;
&lt;br /&gt;
Invoking a module function for each key-value pair with&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sequential|invoke_for_each|foobar|main}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will be different from writing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sequential|for_each|{{#invoke:foobar|main|$#|$@}}}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the first example each key-value pair will be passed to the &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:foobar|main}}&amp;lt;/syntaxhighlight&amp;gt; module function, while in the second example the &amp;lt;code&amp;gt;$#&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$@&amp;lt;/code&amp;gt; tokens will be expanded &#039;&#039;after&#039;&#039; the module function has been invoked. There might be cases in which this will make no difference, however there are several situations where it will lead to nonsensical results.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this function except the &#039;&#039;module name&#039;&#039; and the &#039;&#039;function name&#039;&#039; will not be trimmed of their leading and trailing spaces. The &amp;lt;code&amp;gt;invoke_for_each&amp;lt;/code&amp;gt; &#039;&#039;function name&#039;&#039; itself, however, will be trimmed of its surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;magic_for_each&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;magic_for_each&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|magic_for_each|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = [[#all_sorted|Sortable]] | data2 = Yes&lt;br /&gt;
| label3 = Relevant [[#setting|function-only variables]] | data3 = &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#magic_for_each_value|magic_for_each_value]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#call_for_each|call_for_each]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#invoke_for_each|invoke_for_each]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;For each parameter passed to the current template, call a magic word with at least two arguments (key and value)&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|magic_for_each|parser function|[append 1]|[append 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param n=value n]|[...]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exactly like &amp;lt;code&amp;gt;[[#call_for_each|call_for_each]]&amp;lt;/code&amp;gt;, but calls a [[:mw:Help:Magic words#Parser functions|parser function]] instead of a template.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this function except the magic word will not be trimmed of their leading and trailing spaces. The &amp;lt;code&amp;gt;magic_for_each&amp;lt;/code&amp;gt; &#039;&#039;function name&#039;&#039; itself, however, will be trimmed of its surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;call_for_each_value&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;call_for_each_value&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|call_for_each_value|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = [[#all_sorted|Sortable]] | data2 = Yes&lt;br /&gt;
| label3 = Often preceeded by | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| label4 = Relevant [[#setting|function-only variables]] | data4 = &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;&lt;br /&gt;
| header5 = See also&lt;br /&gt;
| data6 = &amp;lt;code&amp;gt;[[#call_for_each|call_for_each]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#invoke_for_each_value|invoke_for_each_value]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#magic_for_each_value|magic_for_each_value]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#call_for_each_group|call_for_each_group]]&amp;lt;/code&amp;gt;, {{mlx|for loop|}}, {{tl2|for loop}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;For each parameter passed to the current template, call a custom template with at least one parameter (i.e. the parameter&#039;s value)&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|call_for_each_value|template name|[append 1]|[append 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param n=value n]|[...]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt; modifier often accompanies this function. All unnamed arguments following the &#039;&#039;template name&#039;&#039; will be appended after the value parameter. Named arguments will be passed verbatim. A header (&amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;), an iteration delimiter (&amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;), a last iteration delimiter (&amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;), a footer (&amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;), and a fallback text (&amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;) can be declared via the &amp;lt;code&amp;gt;[[#setting|setting]]&amp;lt;/code&amp;gt; modifier – the string assigned to the key-value pair delimiter (&amp;lt;code&amp;gt;p&amp;lt;/code&amp;gt;) will be ignored.&lt;br /&gt;
&lt;br /&gt;
For example, calling {{tl|tl}} with each parameter can be done by writing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sequential|setting|i|, |call_for_each_value|tl}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will be different from writing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sequential|setting|i|, |for_each|{{tl|$@}}}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the first example each value will be passed to the {{tl|tl}} template, while in the second example the &amp;lt;code&amp;gt;$@&amp;lt;/code&amp;gt; token will be expanded &#039;&#039;after&#039;&#039; the {{tl|tl}} template has been called. Here this will make no difference, however there are several situations where it will lead to nonsensical results.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this function except the &#039;&#039;template name&#039;&#039; will not be trimmed of their leading and trailing spaces. The &amp;lt;code&amp;gt;call_for_each_value&amp;lt;/code&amp;gt; &#039;&#039;function name&#039;&#039; itself, however, will be trimmed of its surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;invoke_for_each_value&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;invoke_for_each_value&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|invoke_for_each_value|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = [[#all_sorted|Sortable]] | data2 = Yes&lt;br /&gt;
| label3 = Often preceeded by | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| label4 = Relevant [[#setting|function-only variables]] | data4 = &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;&lt;br /&gt;
| header5 = See also&lt;br /&gt;
| data6 = &amp;lt;code&amp;gt;[[#call_for_each_value|call_for_each_value]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#invoke_for_each|invoke_for_each]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#magic_for_each_value|magic_for_each_value]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;For each parameter passed to the current template, invoke a custom module function with at least one argument (i.e. the parameter&#039;s value)&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|invoke_for_each_value|module name|module function|[append 1]|[append 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param n=value n]|[...]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exactly like &amp;lt;code&amp;gt;[[#call_for_each_value|call_for_each_value]]&amp;lt;/code&amp;gt;, but invokes a module instead of calling a template.&lt;br /&gt;
&lt;br /&gt;
Invoking a module function for each value with&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sequential|invoke_for_each_value|foobar|main}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will be different from writing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sequential|for_each|{{#invoke:foobar|main|$@}}}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the first example each value will be passed to the {{ml|foobar|main}} module function, while in the second example the &amp;lt;code&amp;gt;$@&amp;lt;/code&amp;gt; token will be expanded &#039;&#039;after&#039;&#039; the module function has been invoked. There might be cases in which this will make no difference, however there are several situations where it will lead to nonsensical results.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this function except the &#039;&#039;module name&#039;&#039; and the &#039;&#039;function name&#039;&#039; will not be trimmed of their leading and trailing spaces. The &amp;lt;code&amp;gt;invoke_for_each_value&amp;lt;/code&amp;gt; &#039;&#039;function name&#039;&#039; itself, however, will be trimmed of its surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;magic_for_each_value&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;magic_for_each_value&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|magic_for_each_value|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = [[#all_sorted|Sortable]] | data2 = Yes&lt;br /&gt;
| label3 = Often preceeded by | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| label4 = Relevant [[#setting|function-only variables]] | data4 = &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;&lt;br /&gt;
| header5 = See also&lt;br /&gt;
| data6 = &amp;lt;code&amp;gt;[[#call_for_each_value|call_for_each_value]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#invoke_for_each_value|invoke_for_each_value]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#magic_for_each|magic_for_each]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;For each parameter passed to the current template, call a magic word with at least one argument (i.e. the parameter&#039;s value)&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|magic_for_each_value|parser function|[append 1]|[append 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param n=value n]|[...]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exactly like &amp;lt;code&amp;gt;[[#call_for_each_value|call_for_each_value]]&amp;lt;/code&amp;gt;, but calls a [[:mw:Help:Magic words#Parser functions|parser function]] instead of a template.&lt;br /&gt;
&lt;br /&gt;
For example, if a template had the following code,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sequential|setting|ih|&amp;amp;preloadparams%5b%5d{{=}}|magic_for_each_value|urlencode|QUERY}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and were transcluded as &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template|hello world|àèìòù|foobar}}&amp;lt;/syntaxhighlight&amp;gt;, the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;[[:mw:Help:Magic words#URL data|urlencode]]:...|QUERY&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; parser function would be called for each incoming parameter as first argument and with &amp;lt;code&amp;gt;QUERY&amp;lt;/code&amp;gt; as second argument, and finally the returned text would be prefixed with &amp;lt;code&amp;gt;&amp;amp;preloadparams%5b%5d=&amp;lt;/code&amp;gt;. This would generate,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;preloadparams%5b%5d=hello+world&amp;amp;preloadparams%5b%5d=%C3%A0%C3%A8%C3%AC%C3%B2%C3%B9&amp;amp;preloadparams%5b%5d=foo+bar&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which can be used to allow the creation of pages [[:mw:Manual:Creating pages with preloaded text#Using parameters|with preloaded text and parameters]].&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this function except the magic word will not be trimmed of their leading and trailing spaces. The &amp;lt;code&amp;gt;magic_for_each_value&amp;lt;/code&amp;gt; &#039;&#039;function name&#039;&#039; itself, however, will be trimmed of its surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;call_for_each_group&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;call_for_each_group&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|call_for_each_group|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = Often preceeded by | data2 = &amp;lt;code&amp;gt;[[#all_sorted|all_sorted]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reassorted|reassorted]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| label3 = [[#all_sorted|Sortable]] | data3 = Yes&lt;br /&gt;
| label4 = Relevant [[#setting|function-only variables]] | data4 = &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;&lt;br /&gt;
| header5 = See also&lt;br /&gt;
| data6 = &amp;lt;code&amp;gt;[[#grouping_by_calling|grouping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#call_for_each|call_for_each]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#call_for_each_value|call_for_each_value]]&amp;lt;/code&amp;gt;, {{mlx|for loop|}}, {{tl2|for loop}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Call a custom template for each group of parameters that have the same numeric suffix&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|call_for_each_group|template name|[append 1]|[append 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param n=value n]|[...]&lt;br /&gt;
}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The custom template will be repeatedly called with the numeric id of the group (i.e. the numeric suffix) as &#039;&#039;&#039;parameter zero&#039;&#039;&#039; (i.e. {{param|0}}). This will be an empty string for the group of incoming parameters that do not have a numeric suffix. A hyphen before the numeric suffix will be interpreted as a minus sign (and therefore the group id will be treated as a negative number). Numeric incoming parameters will be treated as if their prefix is an empty string (these can be captured using &amp;lt;code&amp;gt;&amp;amp;#123;&amp;amp;#123;&amp;amp;#123;&amp;amp;#125;&amp;amp;#125;&amp;amp;#125;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;#123;&amp;amp;#123;&amp;amp;#123;&amp;amp;#124;&#039;&#039;fallback text&#039;&#039;&amp;amp;#125;&amp;amp;#125;&amp;amp;#125;&amp;lt;/code&amp;gt; in the callback template). Spaces between the prefix and the numeric suffix will be ignored (therefore writing {{para|foobar123}} will be identical to writing {{para|foobar&amp;amp;nbsp;123}} – in case of collisions one of the two values will be discarded). In the unlikely scenario that the prefix is itself a number (e.g. {{para|1 1}}, {{para|2 1}}, etc.), if this is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or a negative number it will be decreased by one unit in order to leave the parameter zero undisturbed (so &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; will become &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; will become &amp;lt;code&amp;gt;-2&amp;lt;/code&amp;gt;, and so on – if needed, you can use &amp;lt;code&amp;gt;...|[[#purging|purging]]|0|1|...&amp;lt;/code&amp;gt; in the callback template to renormalize these numbers).&lt;br /&gt;
&lt;br /&gt;
All unnamed arguments that follow the &#039;&#039;template name&#039;&#039; in the invocation of this module will appear as sequential parameters in each call. Named arguments will be passed verbatim. Both named and unnamed arguments passed to this function will be given precedence in case of collisions. Numeric argument names below &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; will be decreased by one unit (i.e. &amp;lt;code&amp;gt;...|call_for_each_group&amp;amp;#124;example template&amp;amp;#124;0=Hello world&amp;amp;#124;...&amp;lt;/code&amp;gt; will become {{para|-1|Hello world}} in the callback template – see above).&lt;br /&gt;
&lt;br /&gt;
A header (&amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;), an iteration delimiter (&amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;), a last iteration delimiter (&amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;), a footer (&amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;), and a fallback text (&amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;) can be declared via the &amp;lt;code&amp;gt;[[#setting|setting]]&amp;lt;/code&amp;gt; modifier – the string assigned to the key-value pair delimiter (&amp;lt;code&amp;gt;p&amp;lt;/code&amp;gt;) will be ignored.&lt;br /&gt;
&lt;br /&gt;
If you are a module writer, you might recognize some distant similarities between this function and &amp;lt;code&amp;gt;[[Module:TableTools#affixNums|TableTools.affixNums]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example, if a template named &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{foobar}}&amp;lt;/syntaxhighlight&amp;gt; contained the following code,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|reassorted|call_for_each_group|example template|hello|world|foo=bar}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
writing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{foobar&lt;br /&gt;
	| 1 = Lorem&lt;br /&gt;
	| 2 = ipsum&lt;br /&gt;
	| bicycle-1 = dolor&lt;br /&gt;
	| bicycle1 = sit&lt;br /&gt;
	| boat1 = amet&lt;br /&gt;
	| car2 = consectetur&lt;br /&gt;
	| bicycle2 = adipiscing&lt;br /&gt;
	| other = elit&lt;br /&gt;
	| sunscreen = vestibulum&lt;br /&gt;
	| = ultricies&lt;br /&gt;
	| foo1 = neque nisl&lt;br /&gt;
}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will be equivalent to writing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{example template&lt;br /&gt;
	| 0 =&lt;br /&gt;
	| 1 = hello&lt;br /&gt;
	| 2 = world&lt;br /&gt;
	| = ultricies&lt;br /&gt;
	| foo = bar&lt;br /&gt;
	| other = elit&lt;br /&gt;
	| sunscreen = vestibulum&lt;br /&gt;
}}{{example template&lt;br /&gt;
	| 0 = -1&lt;br /&gt;
	| 1 = hello&lt;br /&gt;
	| 2 = world&lt;br /&gt;
	| bicycle = dolor&lt;br /&gt;
	| foo = bar&lt;br /&gt;
}}{{example template&lt;br /&gt;
	| 0 = 1&lt;br /&gt;
	| 1 = hello&lt;br /&gt;
	| 2 = world&lt;br /&gt;
	| = Lorem&lt;br /&gt;
	| bicycle = sit&lt;br /&gt;
	| boat = amet&lt;br /&gt;
	| foo = bar&lt;br /&gt;
}}{{example template&lt;br /&gt;
	| 0 = 2&lt;br /&gt;
	| 1 = hello&lt;br /&gt;
	| 2 = world&lt;br /&gt;
	| = ipsum&lt;br /&gt;
	| bicycle = adipiscing&lt;br /&gt;
	| car = consectetur&lt;br /&gt;
	| foo = bar&lt;br /&gt;
}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The modifiers &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#non-sequential|non-sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#all_sorted|all_sorted]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[#reassorted|reassorted]]&amp;lt;/code&amp;gt; will affect what groups of parameters will be iterated, not what parameters will be grouped.&#039;&#039;&#039; Before calling this function you will likely want to reduce the list of parameters via one of the &amp;lt;code&amp;gt;with_*_matching&amp;lt;/code&amp;gt; group of modifiers (for instance &amp;lt;code&amp;gt;...|with_name_matching|.%-%d+$|or|[^%-]%d+$|call_for_each_group|...&amp;lt;/code&amp;gt; leaves only the parameters in which both the prefix and the numeric suffix are not empty strings). The &amp;lt;code&amp;gt;[[#reassorted|reassorted]]&amp;lt;/code&amp;gt; modifier often accompanies this function.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{Warnsign}} In writing templates, there is often the habit of signaling [[:mw:Help:Substitution#Multilevel substitution|multilevel substitutions]] using the &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{{|safesubst:}}}&amp;lt;/syntaxhighlight&amp;gt; notation. This is a dangerous practice, because &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{{|safesubst:}}}&amp;lt;/syntaxhighlight&amp;gt; means “write the parameter with an empty name, otherwise write &amp;lt;code&amp;gt;safesubst:&amp;lt;/code&amp;gt;”. Due to the fact that &amp;lt;code&amp;gt;call_for_each_group&amp;lt;/code&amp;gt; &#039;&#039;&#039;can pass parameters with an empty name&#039;&#039;&#039;, a callback template should never use &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{{|safesubst:}}}&amp;lt;/syntaxhighlight&amp;gt; to notate multilevel substitutions, but should use instead &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;safesubst:&amp;lt;noinclude /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;. Not following this advice can lead to bugs that are hard to debug.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
At &amp;amp;#123;&amp;amp;#123;{{rel|Module:Params/doc/examples/list of authors}}&amp;amp;#125;&amp;amp;#125; you can find an example of how to use this function to list authors the same way {{tl|Cite book}} does. For instance, writing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{module:params/doc/examples/list of authors&lt;br /&gt;
	| last1 = Playfair&lt;br /&gt;
	| first1 = I. S. O.&lt;br /&gt;
	| author-link1 = Ian Stanley Ord Playfair&lt;br /&gt;
	| last2 = Stitt&lt;br /&gt;
	| first2 = G. M. S.&lt;br /&gt;
	| last3 = Molony&lt;br /&gt;
	| first3 = C. J. C.&lt;br /&gt;
	| last4 = Toomer&lt;br /&gt;
	| first4 = S. E.&lt;br /&gt;
}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will generate&lt;br /&gt;
&lt;br /&gt;
{{module:params/doc/examples/list of authors&lt;br /&gt;
	| last1 = Playfair&lt;br /&gt;
	| first1 = I. S. O.&lt;br /&gt;
	| author-link1 = Ian Stanley Ord Playfair&lt;br /&gt;
	| last2 = Stitt&lt;br /&gt;
	| first2 = G. M. S.&lt;br /&gt;
	| last3 = Molony&lt;br /&gt;
	| first3 = C. J. C.&lt;br /&gt;
	| last4 = Toomer&lt;br /&gt;
	| first4 = S. E.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
See also &amp;amp;#123;&amp;amp;#123;{{rel|Module:Params/doc/examples/tablebox}}&amp;amp;#125;&amp;amp;#125; for an example of how to exploit this function to create [[Template:Infobox|infoboxes]], and &amp;amp;#123;&amp;amp;#123;{{rel|Module:Params/doc/examples/four cells per row table}}&amp;amp;#125;&amp;amp;#125; for an example of how to exploit this function to create n-column tables.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this function except the &#039;&#039;template name&#039;&#039; will not be trimmed of their leading and trailing spaces. The &amp;lt;code&amp;gt;call_for_each_group&amp;lt;/code&amp;gt; &#039;&#039;function name&#039;&#039; itself, however, will be trimmed of its surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;for_each&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Function &amp;lt;code&amp;gt;for_each&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|for_each|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 1&lt;br /&gt;
| label2 = [[#all_sorted|Sortable]] | data2 = Yes&lt;br /&gt;
| label3 = Relevant [[#setting|function-only variables]] | data3 = &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#list|list]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#list_values|list_values]]&amp;lt;/code&amp;gt;, {{mlx|for nowiki|}}, {{tl2|for nowiki}}, {{tl2|expand wikitext}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;For each parameter passed to the current template, expand all occurrences of &amp;lt;code&amp;gt;$#&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$@&amp;lt;/code&amp;gt; within a given text as key and value respectively&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|for_each|wikitext}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|for_each|Arg name: $#, Arg value: $@}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The text returned by this function is not expanded further (currently this module does not offer an &amp;lt;code&amp;gt;expand_for_each&amp;lt;/code&amp;gt; function). If you need wikitext expansion, use either &amp;lt;code&amp;gt;[[#concat_and_call|concat_and_call]]&amp;lt;/code&amp;gt; to propagate the incoming parameters altogether to the {{tl|for nowiki}} template, or &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt; to propagate the incoming parameters one by one to {{tl|expand wikitext}}.&lt;br /&gt;
&lt;br /&gt;
Example #1 (wikitext expanded via the {{tl|for nowiki}} template – suggested):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sequential|concat_and_call|for nowiki|&amp;lt;br /&amp;gt;|&amp;lt;nowiki&amp;gt;Parameter value is “{{{1}}}”&amp;lt;/nowiki&amp;gt;}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example #2 (wikitext expanded via the {{tl|expand wikitext}} template – less efficient but more flexible):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|setting|i|&amp;lt;br /&amp;gt;|mapping_by_calling|expand wikitext|names_and_values_as|2|3|&lt;br /&gt;
	let|1|&amp;lt;nowiki&amp;gt;Parameter name is “{{{2}}}”, parameter value is “{{{3}}}”&amp;lt;/nowiki&amp;gt;|&lt;br /&gt;
	let|unstrip|yes|&lt;br /&gt;
	list_values}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} The argument passed to this function will not be trimmed of its leading and trailing spaces. The &amp;lt;code&amp;gt;for_each&amp;lt;/code&amp;gt; &#039;&#039;function name&#039;&#039; itself, however, will be trimmed of its surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
== Modifiers (piping functions) ==&lt;br /&gt;
The following are &#039;&#039;modifiers&#039;&#039;, i.e. functions that expect to be piped instead of returning to the caller. Each of them can be followed by either another modifier or a non-piping function. The actions that modifiers do are done sequentially, in the same order chosen during the invocation of this module. Some modifiers, however, after signaling their presence to the modifiers that might follow, add their action to the queue of actions that will be done last (e.g. &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#non-sequential|non-sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#all_sorted|all_sorted]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reassorted|reassorted]]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;sequential&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;sequential&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|sequential|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = No&lt;br /&gt;
| label3 = Conflicts with | data3 = &amp;lt;code&amp;gt;[[#non-sequential|non-sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#all_sorted|all_sorted]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reassorted|reassorted]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#non-sequential|non-sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#all_sorted|all_sorted]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reassorted|reassorted]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#squeezing|squeezing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#filling_the_gaps|filling_the_gaps]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#clearing|clearing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;(IN FUNCTIONS ONLY, DOES NOT AFFECT MODIFIERS) Reduce the parameter list to the subgroup of consecutive parameters that follow {{tjp|1:}}&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|sequential|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sequential|count}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
Using &amp;lt;code&amp;gt;sequential&amp;lt;/code&amp;gt; together with &amp;lt;code&amp;gt;[[#non-sequential|non-sequential]]&amp;lt;/code&amp;gt; will generate an error.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} Like &amp;lt;code&amp;gt;[[#non-sequential|non-sequential]]&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;sequential&amp;lt;/code&amp;gt; modifier permanently marks a query. For instance, writing &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|sequential|with_name_not_matching|1|...}}&amp;lt;/syntaxhighlight&amp;gt; will first mark the query as “sequential”, then will discard the first element from the sequence (leaving all the others intact). And so, no matter how many other parameters will be present, nothing will be shown.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;non-sequential&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;non-sequential&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|non-sequential|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = No&lt;br /&gt;
| label3 = Conflicts with | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#all_sorted|all_sorted]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reassorted|reassorted]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;(IN FUNCTIONS ONLY, DOES NOT AFFECT MODIFIERS) Reduce the parameter list by discarding the subgroup of consecutive parameters that follow {{tjp|1:}}&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|non-sequential|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|non-sequential|setting|ih/p|{{!}}|{{=}}|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
Using &amp;lt;code&amp;gt;non-sequential&amp;lt;/code&amp;gt; together with &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt; will generate an error.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} Like &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;non-sequential&amp;lt;/code&amp;gt; modifier permanently marks a query, and no matter what transformations will follow (see &amp;lt;code&amp;gt;[[#squeezing|squeezing]]&amp;lt;/code&amp;gt;) the parameters&#039; “sequence” will not be shown.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;all_sorted&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;all_sorted&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|all_sorted|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = No&lt;br /&gt;
| label3 = Conflicts with | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reassorted|reassorted]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| label4 = Has no effects on | data4 = &amp;lt;code&amp;gt;[[#count|count]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#value_of|value_of]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#concat_and_call|concat_and_call]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#concat_and_invoke|concat_and_invoke]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#concat_and_magic|concat_and_magic]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header5 = See also&lt;br /&gt;
| data6 = [[Natural sort order]], &amp;lt;code&amp;gt;[[#reassorted|reassorted]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#sorting_sequential_values|sorting_sequential_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;(IN FUNCTIONS ONLY, DOES NOT AFFECT MODIFIERS) When the time will come, all parameters will be dispatched sorted: first the numeric ones in ascending order, then the rest in [[natural sort order|natural order]]&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|all_sorted|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{A note}} This modifier sorts the way &#039;&#039;functions&#039;&#039; iterate across &#039;&#039;all&#039;&#039; parameters based on &#039;&#039;their names&#039;&#039;. If you want to sort &#039;&#039;sequential parameters&#039;&#039; based on &#039;&#039;their values&#039;&#039;, see &amp;lt;code&amp;gt;[[#sorting_sequential_values|sorting_sequential_values]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|all_sorted|setting|ih/p|{{!}}|{{=}}|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
Normally only sequential parameters are dispatched sorted, whereas non-sequential ones are dispatched randomly. The &amp;lt;code&amp;gt;all_sorted&amp;lt;/code&amp;gt; modifier ensures that nothing is left out of ([[natural sort order|natural]]) order. Attention must be paid to the fact that parameters whose name is a negative number will appear first. To avoid this the &amp;lt;code&amp;gt;[[#squeezing|squeezing]]&amp;lt;/code&amp;gt; modifier can be used.&amp;lt;ref&amp;gt;To be precise, the order will not be strictly alphabetical, because this would imply that a template called with the following parameters &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{foobar|-4=you|9=wanna|.=me?|11=marry|-8=do}}&amp;lt;/syntaxhighlight&amp;gt; would see them reordered as follows: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{foobar|-8=do|-4=you|.=me?|9=wanna|11=marry}}&amp;lt;/syntaxhighlight&amp;gt; (with the dot in the middle between negative and positive numbers). To avoid this, &#039;&#039;&#039;numbers are always displayed first&#039;&#039;&#039; (i.e. &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{foobar|-8=do|-4=you|9=wanna|11=marry|.=me?}}&amp;lt;/syntaxhighlight&amp;gt;).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;all_sorted&amp;lt;/code&amp;gt; modifier only affects the way parameters are shown, but has no effects on functions that do not iterate or cannot impose an order, such as:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[#count|count]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[#value_of|value_of]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[#concat_and_call|concat_and_call]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[#concat_and_invoke|concat_and_invoke]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[#concat_and_magic|concat_and_magic]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} The &amp;lt;code&amp;gt;all_sorted&amp;lt;/code&amp;gt; modifier cannot be used with functions that propagate several parameters together in a single call, like &amp;lt;code&amp;gt;[[#concat_and_call|concat_and_call]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#concat_and_invoke|concat_and_invoke]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[#concat_and_magic|concat_and_magic]]&amp;lt;/code&amp;gt;, because during a call the order of arguments is always lost. For the same reason, it is not possible to guess the order of named parameters a template was transcluded with.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;reassorted&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;reassorted&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|reassorted|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = No&lt;br /&gt;
| label3 = Conflicts with | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#all_sorted|all_sorted]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| label4 = Has no effects on | data4 = &amp;lt;code&amp;gt;[[#count|count]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#value_of|value_of]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#concat_and_call|concat_and_call]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#concat_and_invoke|concat_and_invoke]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#concat_and_magic|concat_and_magic]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header5 = See also&lt;br /&gt;
| data6 = [[Natural sort order]], &amp;lt;code&amp;gt;[[#all_sorted|all_sorted]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#sorting_sequential_values|sorting_sequential_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;(IN FUNCTIONS ONLY, DOES NOT AFFECT MODIFIERS) When the time will come, all parameters will be dispatched sorted: first non numeric ones in [[natural sort order|natural order]]&#039;&#039;, then the numeric ones in ascending order&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|reassorted|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier is identical to &amp;lt;code&amp;gt;[[#all_sorted|all_sorted]]&amp;lt;/code&amp;gt;, but numbers are iterated last (as in “bar, foo, hello, zebra, 1, 2, 3, …”).&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} The &amp;lt;code&amp;gt;reassorted&amp;lt;/code&amp;gt; modifier cannot be used with functions that propagate several parameters together in a single call, like &amp;lt;code&amp;gt;[[#concat_and_call|concat_and_call]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#concat_and_invoke|concat_and_invoke]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[#concat_and_magic|concat_and_magic]]&amp;lt;/code&amp;gt;, because during a call the order of arguments is always lost. For the same reason, it is not possible to guess the order of named parameters a template was transcluded with.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;setting&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;setting&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|setting|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 2–7 (variable)&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = Memory slots&lt;br /&gt;
| data4 = {{aligned table|fullwidth=y&lt;br /&gt;
  | col1header=y | col1style=display:block;&lt;br /&gt;
  | &amp;lt;code&amp;gt;p&amp;lt;/code&amp;gt;| Key-value delimiter&lt;br /&gt;
  | &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;| Iteration delimiter&lt;br /&gt;
  | &amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;| Last iteration delimiter&lt;br /&gt;
  | &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;| Header text&lt;br /&gt;
  | &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;| Footer text&lt;br /&gt;
  | &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;| Fallback text&lt;br /&gt;
 }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Define glue strings&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|setting|directives|...|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier allows some internal variables to be set and later be used by functions. It takes a variable number of arguments, relying on the first argument to understand how many other arguments to read. A few examples will introduce it better than words:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|setting|i|{{!}}|list_values}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*: ↳ Set the value of &#039;&#039;iteration delimiter&#039;&#039; to &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, then list all values&lt;br /&gt;
* &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|setting|ih|{{!}}|list_values}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*: ↳ Set the value of both &#039;&#039;header text&#039;&#039; and &#039;&#039;iteration delimiter&#039;&#039; to &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, then list all values&lt;br /&gt;
* &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|setting|ih/p|{{!}}|{{=}}|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*: ↳ Set the value of both &#039;&#039;header text&#039;&#039; and &#039;&#039;iteration delimiter&#039;&#039; to &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, set &#039;&#039;key-value pair delimiter&#039;&#039; to &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, then list all parameters&lt;br /&gt;
* &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|setting|ih/p/n|{{!}}|{{=}}|No parameters were passed|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*: ↳ Set the value of both &#039;&#039;header text&#039;&#039; and &#039;&#039;iteration delimiter&#039;&#039; to &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, set &#039;&#039;key-value pair delimiter&#039;&#039; to &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, set &#039;&#039;fallback text&#039;&#039; to &amp;lt;code&amp;gt;No parameters were passed&amp;lt;/code&amp;gt;, then list all parameters&lt;br /&gt;
&lt;br /&gt;
The first argument is a slash-separated list of lists of slots to assign; one slot is referred by exactly one character and each list of slots maps exactly one argument. A slot indicates which internal variable to set. If more than one slot is aggregated within the same slash-separated list the same text will be assigned to more than one variable.&lt;br /&gt;
&lt;br /&gt;
The slots available are the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Slots&lt;br /&gt;
! Variable&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;p&amp;lt;/code&amp;gt;&lt;br /&gt;
| &#039;&#039;Key-value pair delimiter&#039;&#039;&lt;br /&gt;
| The string of text that will be placed between each parameter name and its value; it is never inserted by functions that only iterate between values, or by functions that pass the key-value pairs to external calls.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;&lt;br /&gt;
| &#039;&#039;Iteration delimiter&#039;&#039;&lt;br /&gt;
| The string of text that will be placed between each iteration; it is never inserted unless there are two or more parameters to show when &amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt; is not given, or three or more parameters when &amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt; is given.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;&lt;br /&gt;
| &#039;&#039;Last iteration delimiter&#039;&#039;&lt;br /&gt;
| The string of text that will be placed between the second last and the last iteration; it is never inserted unless there are two or more parameters to show; if omitted defaults to &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;&lt;br /&gt;
| &#039;&#039;Header text&#039;&#039;&lt;br /&gt;
| The string of text that will be placed before the iteration begins; it is never inserted if there are no parameters to show.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;&lt;br /&gt;
| &#039;&#039;Footer text&#039;&#039;&lt;br /&gt;
| The string of text that will be placed after the iteration is over; it is never inserted if there are no parameters to show.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;&lt;br /&gt;
| &#039;&#039;Fallback text&#039;&#039;&lt;br /&gt;
| The string of text that will be placed if there are no parameters to show.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All space characters in the directives arguments are discarded. Therefore writing &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|setting|ih/p|...}}&amp;lt;/syntaxhighlight&amp;gt; will be equivalent to writing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|setting| i&lt;br /&gt;
	h	/ p |...}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In theory, instead of assigning different slots at once (i.e. &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{...|setting|ih/p|{{!}}|{{=}}|...}}&amp;lt;/syntaxhighlight&amp;gt;), it is possible to write separate invocations of &amp;lt;code&amp;gt;setting&amp;lt;/code&amp;gt; for each variable, as in &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{...|setting|ih|{{!}}|setting|p|{{=}}...}}&amp;lt;/syntaxhighlight&amp;gt;. This method however will be slightly less efficient.&lt;br /&gt;
&lt;br /&gt;
Sometimes it might be necessary to make the values assigned depend on conditional expressions. For instance, the following imaginary &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Foobar see also}}&amp;lt;/syntaxhighlight&amp;gt; template uses the &amp;lt;code&amp;gt;[[:mw:Help:Extension:ParserFunctions##ifexpr|#ifexpr]]&amp;lt;/code&amp;gt; parser function to properly show the “and” conjunction and possibly an [[Serial comma|Oxford comma]] when more than two page names are provided:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{Hatnote|{{{altphrase|Foobar see also}}}: {{#if:{{{1|}}}&lt;br /&gt;
	|{{#invoke:params|sequential|squeezing|setting|i/l|, |{{#ifexpr:{{#invoke:params|sequential|squeezing|count}} &amp;gt; 2|,}} and |trimming_values|for_each|[[$@]]}}&lt;br /&gt;
	|{{Error|{{tl|Foobar see also}} requires at least one page name}}&lt;br /&gt;
}}}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find this example at &amp;amp;#123;&amp;amp;#123;{{rel|Module:Params/doc/examples/Oxford comma}}&amp;amp;#125;&amp;amp;#125;. For instance, &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{module:params/doc/examples/Oxford comma|Latin|English|German|Italian}}&amp;lt;/syntaxhighlight&amp;gt; will generate&lt;br /&gt;
&lt;br /&gt;
{{module:params/doc/examples/Oxford comma|Latin|English|German|Italian}}&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} The &amp;lt;code&amp;gt;setting&amp;lt;/code&amp;gt; modifier will be trimmed of its surrounding spaces. The directives argument will be stripped of all space characters, including internal spaces. All the other arguments passed to this modifier will be parsed verbatim (i.e. leading and trailing spaces will not be removed).&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;squeezing&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;squeezing&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|squeezing|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#filling_the_gaps|filling_the_gaps]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#clearing|clearing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[Module:TableTools#compressSparseArray|TableTools.compressSparseArray]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Rearrange all parameters that have numeric names to form a compact sequence starting from 1, keeping the same order&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|squeezing|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|squeezing|sequential|setting|i/p|&amp;lt;br /&amp;gt;|: |list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow. If you are a module writer, you might recognize some similarities between this function and &amp;lt;code&amp;gt;[[Module:TableTools#compressSparseArray|TableTools.compressSparseArray]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following three concatenations will lead to the same result of discarding all parameters with numeric names:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{...|excluding_numeric_names|...}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{...|with_name_not_matching|^%-?%d+$|...}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{...|non-sequential|squeezing|...}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{...|squeezing|non-sequential|...}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first solution is the most optimized one. Furthermore, in the last two solutions the numeric parameters are discarded just before the final function is invoked (sometimes this might be a wanted result).&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;filling_the_gaps&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;filling_the_gaps&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|filling_the_gaps|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#squeezing|squeezing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#clearing|clearing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Assign an empty string to all undefined numeric parameters between 1 or a lower numeric parameter name provided and the maximum numeric parameter provided&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|filling_the_gaps|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|filling_the_gaps|sequential|setting|i/p|&amp;lt;br /&amp;gt;|: |list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
Note that when all numeric parameters are lower than 1, the gap between 1 and the maximum numeric parameter will not be filled. The following table provides some examples.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto;&amp;quot;&lt;br /&gt;
|+ Numeric parameters provided&lt;br /&gt;
|-&lt;br /&gt;
! Before calling &amp;lt;code&amp;gt;filling_the_gaps&amp;lt;/code&amp;gt;&lt;br /&gt;
! After calling &amp;lt;code&amp;gt;filling_the_gaps&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1, 2&lt;br /&gt;
|-&lt;br /&gt;
| 6, 9&lt;br /&gt;
| 1, 2, 3, 4, 5, 6, 7, 8, 9&lt;br /&gt;
|-&lt;br /&gt;
| -5, -3&lt;br /&gt;
| -5, -4, -3&lt;br /&gt;
|-&lt;br /&gt;
| -5, -3, 1&lt;br /&gt;
| -5, -4, -3, -2, -1, 0, 1&lt;br /&gt;
|-&lt;br /&gt;
| -1&lt;br /&gt;
| -1&lt;br /&gt;
|-&lt;br /&gt;
| -2&lt;br /&gt;
| -2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{A note}} There is a safety limit of at most 1024 undefined parameters that can be filled using this modifier.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;clearing&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;clearing&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|clearing|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = Often accompanied by | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#squeezing|squeezing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#filling_the_gaps|filling_the_gaps]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Remove all numeric parameters that are not in the sequence&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|clearing|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
Unlike &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt; – which affects only the way parameters are shown – this modifier actually removes all non-sequential numeric parameters, albeit leaves non-numeric parameters intact.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|clearing|setting|i/p|&amp;lt;br /&amp;gt;|: |list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to remove also non-numeric parameters, add the &amp;lt;code&amp;gt;[[#excluding_non-numeric_names|excluding_non-numeric_names]]&amp;lt;/code&amp;gt; modifier:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|clearing|excluding_non-numeric_names|setting|i/p|&amp;lt;br /&amp;gt;|: |list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want instead to remove sequential parameters and leave the rest, use &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{...|cutting|-1|1|...}}&amp;lt;/syntaxhighlight&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|cutting|-1|1|setting|i/p|&amp;lt;br /&amp;gt;|: |list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;cutting&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;cutting&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|cutting|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 2&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = Often accompanied by | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#squeezing|squeezing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#filling_the_gaps|filling_the_gaps]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#clearing|clearing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cropping|cropping]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#purging|purging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#backpurging|backpurging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reversing_numeric_names|reversing_numeric_names]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#mirroring_numeric_names|mirroring_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#pivoting_numeric_names|pivoting_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#swapping_numeric_names|swapping_numeric_names]]&amp;lt;/code&amp;gt;--&amp;gt;, &amp;lt;code&amp;gt;[[#sorting_sequential_values|sorting_sequential_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Remove zero or more parameters from the beginning and the end of the &#039;&#039;&#039;parameters&#039; sequence&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|cutting|left trim|right trim|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first argument indicates how many sequential parameters must be removed from the beginning of the parameter sequence, the second argument indicates how many sequential parameters must be removed from the end of the parameter list. If any of the two arguments contains a negative number its absolute value indicates what must be left &#039;&#039;on the opposite side&#039;&#039; – i.e. &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|cutting|-3|0|list}}&amp;lt;/syntaxhighlight&amp;gt; indicates that the last three arguments must not be discarded.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|cutting|0|2|sequential|call_for_each_value|example template}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the absolute value of the sum of the two arguments (left and right cut) is greater than the number of &#039;&#039;sequential&#039;&#039; parameters available, the behavior will be the same as if the sum had been equal to the number of sequential parameters available, both when this is a positive value and when it is a negative value (with opposite results). After the desired sequential parameters have been discarded, all numeric parameters will be shifted accordingly.&lt;br /&gt;
&lt;br /&gt;
In some cases it might be necessary to concatenate more than one invocation of the &amp;lt;code&amp;gt;cutting&amp;lt;/code&amp;gt; modifier. For instance, the following code prints the last unnamed parameter passed, but only if at least two parameters were passed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sequential|cutting|1|0|cutting|-1|0|list_values}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{A note|Suggestion:}} Although &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|cutting|-1|1|...}}&amp;lt;/syntaxhighlight&amp;gt; de facto gets rid of all sequential parameters, in most cases it is clearer and more idiomatic to write &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|non-sequential|...}}&amp;lt;/syntaxhighlight&amp;gt; to obtain the same effect. The last method however cannot be used when it is important that sequential parameters are removed before a particular modifier is called, because &amp;lt;code&amp;gt;[[#non-sequential|non-sequential]]&amp;lt;/code&amp;gt; does not take effect until the final function is invoked. Writing instead &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|sequential|cutting|-1|1|...}}&amp;lt;/syntaxhighlight&amp;gt; will leave zero arguments to show.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;cropping&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;cropping&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|cropping|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 2&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = Often accompanied by | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#squeezing|squeezing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#filling_the_gaps|filling_the_gaps]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#clearing|clearing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cutting|cutting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#purging|purging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#backpurging|backpurging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reversing_numeric_names|reversing_numeric_names]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#mirroring_numeric_names|mirroring_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#pivoting_numeric_names|pivoting_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#swapping_numeric_names|swapping_numeric_names]]&amp;lt;/code&amp;gt;--&amp;gt;, &amp;lt;code&amp;gt;[[#sorting_sequential_values|sorting_sequential_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Remove zero or more parameters from the beginning and the end of the &#039;&#039;&#039;list of numeric parameters&#039;&#039;&#039; (not only the sequential ones)&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|cropping|left crop|right crop|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier is very similar to &amp;lt;code&amp;gt;[[#cutting|cutting]]&amp;lt;/code&amp;gt;, but instead of removing arguments from the extremities of the parameters&#039; &#039;&#039;sequence&#039;&#039;, arguments will be removed counting from the first and the last numeric arguments given (i.e. {{para|-1000|...}} and {{para|1000|...}} in the case of &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{foobar|-1000=hello|1=my|1000=darling}}&amp;lt;/syntaxhighlight&amp;gt;). If any of the two arguments contains a negative number its absolute value indicates what must be left &#039;&#039;on the opposite side&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|cropping|2|1|sequential|call_for_each_value|example template}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For instance, when a template transcluded as &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template|-2=minus two|0=zero|1=one|2=two|3=three|19=nineteen|20=twenty}}&amp;lt;/syntaxhighlight&amp;gt; uses the &amp;lt;code&amp;gt;[[#cutting|cutting]]&amp;lt;/code&amp;gt; modifier with &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; as arguments, as in the example above, the following parameters will be left:&lt;br /&gt;
&lt;br /&gt;
: -2: minus two&lt;br /&gt;
: 0: zero&lt;br /&gt;
: 16: nineteen&lt;br /&gt;
: 17: twenty]&lt;br /&gt;
&lt;br /&gt;
If instead the template uses the &amp;lt;code&amp;gt;[[#cutting|cropping]]&amp;lt;/code&amp;gt; modifier with &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; as arguments, the following parameters will be left:&lt;br /&gt;
: 0: zero&lt;br /&gt;
: 1: one&lt;br /&gt;
: 2: two&lt;br /&gt;
: 3: three&lt;br /&gt;
: 19: nineteen&lt;br /&gt;
&lt;br /&gt;
If the absolute value of the sum of the two arguments (left and right crop) is greater than the difference between the largest and the lowest &#039;&#039;numeric&#039;&#039; parameters available, the behavior will be the same as if the sum had been equal to the number of numeric parameters available, both when this is a positive value and when it is a negative value (with opposite results). When &#039;&#039;sequential&#039;&#039; parameters are present among the discarded parameters, all the remaining numeric parameters greater than zero will be shifted accordingly.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;purging&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;purging&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|purging|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 2&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = Often accompanied by | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#squeezing|squeezing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#filling_the_gaps|filling_the_gaps]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#clearing|clearing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cutting|cutting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cropping|cropping]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#backpurging|backpurging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reversing_numeric_names|reversing_numeric_names]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#mirroring_numeric_names|mirroring_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#pivoting_numeric_names|pivoting_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#swapping_numeric_names|swapping_numeric_names]]&amp;lt;/code&amp;gt;--&amp;gt;, &amp;lt;code&amp;gt;[[#sorting_sequential_values|sorting_sequential_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Remove zero or more parameters from any point of the list of numeric parameters, shifting everything accordingly&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|purging|start offset|length|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first argument indicates at which point in the parameter list the removal must begin, the second argument indicates how many parameters must be discarded among it and what lies &#039;&#039;on the right side&#039;&#039;. If the second argument contains zero or a negative number its absolute value indicates what must be left &#039;&#039;at the end of the right side&#039;&#039; of the list of numeric parameters – i.e. &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|purging|5|0|list}}&amp;lt;/syntaxhighlight&amp;gt; indicates that every numeric argument whose numeric name is greater than &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; must be removed.&lt;br /&gt;
&lt;br /&gt;
Example #1 (purge the first parameter):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|purging|1|1|call_for_each_value|example template}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example #2 (purge the second, third, and four parameters):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|purging|2|3|call_for_each_value|example template}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;backpurging&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;backpurging&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|backpurging|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 2&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = Often accompanied by | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#squeezing|squeezing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#filling_the_gaps|filling_the_gaps]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#clearing|clearing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cutting|cutting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cropping|cropping]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#purging|purging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reversing_numeric_names|reversing_numeric_names]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#mirroring_numeric_names|mirroring_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#pivoting_numeric_names|pivoting_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#swapping_numeric_names|swapping_numeric_names]]&amp;lt;/code&amp;gt;--&amp;gt;, &amp;lt;code&amp;gt;[[#sorting_sequential_values|sorting_sequential_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Remove zero or more parameters from any point of the list of numeric parameters, moving backwards and shifting everything accordingly&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|backpurging|start offset|length|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first argument indicates at which point in the parameter list the removal must begin, the second argument indicates how many parameters must be discarded among it and what lies &#039;&#039;on the left side&#039;&#039;. If the second argument contains zero or a negative number its absolute value indicates what must be left &#039;&#039;at the end of the left side&#039;&#039; of the list of numeric parameters – i.e. &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|purging|5|0|list}}&amp;lt;/syntaxhighlight&amp;gt; indicates that every numeric argument whose numeric name is less than &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt; must be removed.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|backpurging|3|1|call_for_each_value|example template}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following code removes all parameters with negative and zero numeric names, then lists the rest:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|backpurging|0|0|for_each|[$#: $@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;reversing_numeric_names&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;reversing_numeric_names&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|reversing_numeric_names|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = Often accompanied by | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#squeezing|squeezing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#filling_the_gaps|filling_the_gaps]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#clearing|clearing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cutting|cutting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cropping|cropping]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#purging|purging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#backpurging|backpurging]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#mirroring_numeric_names|mirroring_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#pivoting_numeric_names|pivoting_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#swapping_numeric_names|swapping_numeric_names]]&amp;lt;/code&amp;gt;--&amp;gt;, &amp;lt;code&amp;gt;[[#sorting_sequential_values|sorting_sequential_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Reverse the order of all numeric parameters (not only sequential ones), making sure that the largest numeric parameter and {{para|1}} are swapped&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|reversing_numeric_names|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|reversing_numeric_names|for_each|[$#: $@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{A note}} If negative parameters are present this function becomes non-invertible. This means that &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|reversing_numeric_names|reversing_numeric_names|...}}&amp;lt;/syntaxhighlight&amp;gt; will not restore the original parameter names, but will shift all numeric parameters so that what formerly was the smallest parameter name will now become {{para|1}}.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;mirroring_numeric_names&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;mirroring_numeric_names&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|mirroring_numeric_names|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = Often accompanied by | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#squeezing|squeezing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#filling_the_gaps|filling_the_gaps]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#clearing|clearing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cutting|cutting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cropping|cropping]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#purging|purging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#backpurging|backpurging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reversing_numeric_names|reversing_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#pivoting_numeric_names|pivoting_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#swapping_numeric_names|swapping_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#sorting_sequential_values|sorting_sequential_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Reverse the order of all numeric parameters (not only sequential ones)&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|mirroring_numeric_names|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
This modifier reverses the order of numeric parameters, making sure that the minimum and the maximum numeric parameters remain always the same (albeit inverted).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|mirroring_numeric_names|for_each|[$#: $@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;pivoting_numeric_names&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;pivoting_numeric_names&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|pivoting_numeric_names|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = Often accompanied by | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#squeezing|squeezing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#filling_the_gaps|filling_the_gaps]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#clearing|clearing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cutting|cutting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cropping|cropping]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#purging|purging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#backpurging|backpurging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reversing_numeric_names|reversing_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mirroring_numeric_names|mirroring_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#swapping_numeric_names|swapping_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#sorting_sequential_values|sorting_sequential_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Reverse the order of all numeric parameters (not only sequential ones), &#039;&#039;&#039;keeping the parameters&#039; sequence always centered&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|pivoting_numeric_names|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
This modifier reverses the order of numeric parameters, making sure that those in the parameters&#039; sequence always remain in the sequence. As a consequence, the values of the minimum and the maximum numeric parameters may change. If no sequence is present this modifier is identical to &amp;lt;code&amp;gt;[[#mirroring_numeric_names|mirroring_numeric_names]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|pivoting_numeric_names|for_each|[$#: $@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;swapping_numeric_names&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;swapping_numeric_names&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|swapping_numeric_names|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = Often accompanied by | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#squeezing|squeezing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#filling_the_gaps|filling_the_gaps]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#clearing|clearing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cutting|cutting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cropping|cropping]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#purging|purging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#backpurging|backpurging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mirroring_numeric_names|mirroring_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#pivoting_numeric_names|pivoting_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#sorting_sequential_values|sorting_sequential_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Swap the lowest numeric parameter with the highest, the second lowest with the second highest, and so on, keeping the sequence in the same place albeit in reverse order&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|swapping_numeric_names|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|swapping_numeric_names|for_each|[$#: $@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;sorting_sequential_values&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;sorting_sequential_values&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|sorting_sequential_values|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0 or 1&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = Often accompanied by | data3 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#squeezing|squeezing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#filling_the_gaps|filling_the_gaps]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#clearing|clearing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cutting|cutting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cropping|cropping]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#purging|purging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#backpurging|backpurging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reversing_numeric_names|reversing_numeric_names]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#mirroring_numeric_names|mirroring_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#pivoting_numeric_names|pivoting_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#swapping_numeric_names|swapping_numeric_names]]&amp;lt;/code&amp;gt;--&amp;gt;, &amp;lt;code&amp;gt;[[#all_sorted|all_sorted]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reassorted|reassorted]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Sort the order of sequential values&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|sorting_sequential_values|[criterion]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{A note}} This modifier sorts &#039;&#039;sequential parameters&#039;&#039; based on &#039;&#039;their values&#039;&#039;. If you want to sort the way &#039;&#039;functions&#039;&#039; iterate across &#039;&#039;all&#039;&#039; parameters based on &#039;&#039;their names&#039;&#039;, see &amp;lt;code&amp;gt;[[#all_sorted|all_sorted]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This modifier optionally supports one argument to specify the sorting criterion. If this is omitted it is assumed that sequential values must be ordered alphabetically. Currently the only other possible criterion is &amp;lt;code&amp;gt;naturally&amp;lt;/code&amp;gt;, for ordering sequential values in [[natural sort order]].&lt;br /&gt;
&lt;br /&gt;
Example (alphabetical sort order):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sorting_sequential_values|for_each|[$#: $@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example (natural sort order):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sorting_sequential_values|naturally|for_each|[$#: $@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;inserting&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;inserting&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|inserting|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#imposing|imposing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#providing|providing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#sequential|sequential]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#squeezing|squeezing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#filling_the_gaps|filling_the_gaps]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#clearing|clearing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cutting|cutting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cropping|cropping]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#purging|purging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#backpurging|backpurging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reversing_numeric_names|reversing_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mirroring_numeric_names|mirroring_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#pivoting_numeric_names|pivoting_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#swapping_numeric_names|swapping_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#discarding|discarding]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#all_sorted|all_sorted]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#reassorted|reassorted]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#new|new]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Add one or more numeric parameters to the list of parameters, shifting everything accordingly&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|inserting|position|how many|...|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|inserting|1|2|hello|world|for_each|[$#: $@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, appending parameters after the last numeric parameter requires some workaround. The following example will add three new parameters and list all parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|&lt;br /&gt;
	all_sorted|&lt;br /&gt;
	entering_substack|&lt;br /&gt;
		backpurging|0|0|&lt;br /&gt;
		detaching_substack|&lt;br /&gt;
		reversing_numeric_names|&lt;br /&gt;
		inserting|1|3|added parameter 3|added parameter 2|added parameter 1|&lt;br /&gt;
		reversing_numeric_names|&lt;br /&gt;
	merging_substack|&lt;br /&gt;
	for_each|[$#:$@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly, the following workaround will append three parameters at the end of the sequence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|&lt;br /&gt;
	all_sorted|&lt;br /&gt;
	entering_substack|&lt;br /&gt;
		clearing|&lt;br /&gt;
		detaching_substack|&lt;br /&gt;
		reversing_numeric_names|&lt;br /&gt;
		inserting|1|3|added parameter 3|added parameter 2|added parameter 1|&lt;br /&gt;
		reversing_numeric_names|&lt;br /&gt;
	leaving_substack|&lt;br /&gt;
	inserting|1|3||||&lt;br /&gt;
	flushing|&lt;br /&gt;
	for_each|[$#:$@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} The values of the parameters inserted will not be trimmed of their leading and trailing spaces. The first two numeric arguments and the &amp;lt;code&amp;gt;inserting&amp;lt;/code&amp;gt; modifier name itself, however, will be trimmed of their surrounding spaces.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;imposing&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;imposing&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|imposing|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 2&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#providing|providing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#discarding|discarding]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#inserting|inserting]]&amp;lt;/code&amp;gt;--&amp;gt;, &amp;lt;code&amp;gt;[[#filling_the_gaps|filling_the_gaps]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#new|new]]&amp;lt;/code&amp;gt;--&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Impose a new value to a parameter&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|imposing|name|value|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|imposing|foo|bar|imposing|hello|world|for_each|[$#: $@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} The value assigned will not be trimmed of its leading and trailing spaces. The name of the parameter and the &amp;lt;code&amp;gt;imposing&amp;lt;/code&amp;gt; modifier name itself, however, will be trimmed of their surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;providing&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;providing&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|providing|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 2&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#imposing|imposing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#discarding|discarding]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#inserting|inserting]]&amp;lt;/code&amp;gt;--&amp;gt;, &amp;lt;code&amp;gt;[[#filling_the_gaps|filling_the_gaps]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#new|new]]&amp;lt;/code&amp;gt;--&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Assign a new value to a parameter, but only when missing&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|providing|name|value|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|providing|foo|bar|providing|hello|world|for_each|[$#: $@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} The value assigned will not be trimmed of its leading and trailing spaces. The name of the parameter and the &amp;lt;code&amp;gt;providing&amp;lt;/code&amp;gt; modifier name itself, however, will be trimmed of their surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;discarding&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;discarding&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|discarding|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 1 or 2&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#clearing|clearing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cutting|cutting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#cropping|cropping]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#purging|purging]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#backpurging|backpurging]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#inserting|inserting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#new|new]]&amp;lt;/code&amp;gt;--&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Discard one or more numeric parameters or one non-numeric parameter&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|discarding|name|[how many]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If, and only if, the name of the parameter is numeric, it is possible to add a second argument to indicate how many contiguous parameters must be discarded starting from the first argument. If the discarded parameters is part of the parameters&#039; sequence one or more holes will be created. To avoid creating holes, use &amp;lt;code&amp;gt;[[#purging|purging]]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[[#backpurging|backpurging]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example #1 (discard the parameter named {{para|hello}}):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|discarding|hello|for_each|[$#: $@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example #2 (discard the parameter named {{para|5}}):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|discarding|5|for_each|[$#: $@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example #3 (discard the parameters named {{para|1}}, {{para|2}}, {{para|3}} and {{para|4}}):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|discarding|1|4|for_each|[$#: $@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is possible to use this modifier to check for unknown parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#ifexpr:{{#invoke:params|discarding|hello|discarding|wind|count}} &amp;gt; 0&lt;br /&gt;
	|{{Error|Error: The only parameters accepted are {{para|hello}} and {{para|wind}}.}}&lt;br /&gt;
	|Everything is good: do something&lt;br /&gt;
}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find this example at &amp;amp;#123;&amp;amp;#123;{{rel|Module:Params/doc/examples/check for unknown parameters}}&amp;amp;#125;&amp;amp;#125;. For instance, &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{module:params/doc/examples/check for unknown parameters|hello=world|wind=surfing}}&amp;lt;/syntaxhighlight&amp;gt; will generate&lt;br /&gt;
&lt;br /&gt;
: {{module:params/doc/examples/check for unknown parameters|hello=world|wind=surfing}}&lt;br /&gt;
&lt;br /&gt;
For simple cases like this, however, specialized modules are available; you might want to have a look at:&lt;br /&gt;
&lt;br /&gt;
* {{ml|Check for unknown parameters|check}}&lt;br /&gt;
* {{ml|Check for deprecated parameters|check}}&lt;br /&gt;
* {{ml|Check for clobbered parameters|check}}&lt;br /&gt;
* {{ml|Parameter validation|validateparams}}&lt;br /&gt;
* {{ml|TemplatePar|valid}}&lt;br /&gt;
&lt;br /&gt;
When used to discard single parameters, this modifier is equivalent to writing &amp;lt;code&amp;gt;...&amp;amp;#124;[[#with_name_not_matching|with_name_not_matching]]&amp;amp;#124;&#039;&#039;parameter name&#039;&#039;&amp;amp;#124;strict&amp;amp;#124;...&amp;lt;/code&amp;gt;. However, due to the fact that &amp;lt;code&amp;gt;[[#with_name_not_matching|with_name_not_matching]]&amp;lt;/code&amp;gt; needs to cross-check for the possible presence of &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt; keywords, using &amp;lt;code&amp;gt;discarding&amp;lt;/code&amp;gt; will be slightly more efficient.&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this modifier and the &amp;lt;code&amp;gt;discarding&amp;lt;/code&amp;gt; modifier name itself will be trimmed of their surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;excluding_non-numeric_names&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;excluding_non-numeric_names&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|excluding_non-numeric_names|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#excluding_non-numeric_names|excluding_non-numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#with_name_matching|with_name_matching]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#with_name_not_matching|with_name_not_matching]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#clearing|clearing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Discard all non-numeric parameters&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|excluding_non-numeric_names|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier is only syntax sugar for &amp;lt;code&amp;gt;...&amp;amp;#124;with_name_matching&amp;amp;#124;^%-?%d+$&amp;amp;#124;...&amp;lt;/code&amp;gt; (but using a slighly faster optimization). For the inverse modifier, see &amp;lt;code&amp;gt;[[#excluding_numeric_names|excluding_numeric_names]]&amp;lt;/code&amp;gt;. If you want to remove also non-sequential parameters, add the &amp;lt;code&amp;gt;[[#clearing|clearing]]&amp;lt;/code&amp;gt; modifier to the pipeline (&amp;lt;code&amp;gt;...&amp;amp;#124;excluding_non-numeric_names&amp;amp;#124;clearing&amp;amp;#124;...&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;excluding_numeric_names&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;excluding_numeric_names&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|excluding_numeric_names|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#excluding_non-numeric_names|excluding_non-numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#with_name_matching|with_name_matching]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#with_name_not_matching|with_name_not_matching]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Discard all numeric parameters (not only the sequential ones)&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|excluding_numeric_names|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier is only syntax sugar for &amp;lt;code&amp;gt;...&amp;amp;#124;with_name_not_matching&amp;amp;#124;^%-?%d+$&amp;amp;#124;...&amp;lt;/code&amp;gt; (but using a slighly faster optimization). For the inverse modifier, see &amp;lt;code&amp;gt;[[#excluding_non-numeric_names|excluding_non-numeric_names]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;with_name_matching&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;with_name_matching&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|with_name_matching|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#excluding_numeric_names|excluding_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#excluding_non-numeric_names|excluding_non-numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#with_name_not_matching|with_name_not_matching]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#with_value_matching|with_value_matching]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#with_value_not_matching|with_value_not_matching]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Discard all parameters whose name &#039;&#039;does not match &#039;&#039;&#039;any&#039;&#039;&#039;&#039;&#039; of the given patterns&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|with_name_matching|target 1|[plain flag 1]|[or]|[target 2]|[plain flag 2]|[or]|[...]|[target N]|[plain flag N]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Internally this modifier uses Lua&#039;s &amp;lt;code&amp;gt;[[:mw:Extension:Scribunto/Lua reference manual#string.find|string.find()]]&amp;lt;/code&amp;gt; function to find whether parameter names match against given patterns; therefore, unless a &#039;&#039;plain flag&#039;&#039; is set, please use the same syntax of [[:mw:Extension:Scribunto/Lua reference manual#Patterns|Lua patterns]]. The &#039;&#039;plain flag&#039;&#039; can be either &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; or omitted. When omitted it is assumed that the target string is a Lua pattern. The difference between &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; is that the latter also requires that the lengths match (this happens only when the two strings are 100% identical). In order to facilitate wikitext scripting in the &#039;&#039;plain flag&#039;&#039; argument, the &amp;lt;code&amp;gt;pattern&amp;lt;/code&amp;gt; keyword is available too, equivalent to omitting the argument.&lt;br /&gt;
&lt;br /&gt;
To express a [[Disjunction (logical connective)|logical OR]] the &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt; keyword is available. To express a [[Logical conjunction|logical AND]] instead, concatenate more invocations of &amp;lt;code&amp;gt;with_name_matching&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
For the sake of argument we will imagine that we are invoking &amp;lt;code&amp;gt;with_name_matching&amp;lt;/code&amp;gt; from within the {{tl|Infobox artery}} template, and this is being called with the following parameters:&lt;br /&gt;
&lt;br /&gt;
{{tj|Infobox artery&lt;br /&gt;
	| Name: Pulmonary artery&lt;br /&gt;
	| Latin: truncus pulmonalis, arteria pulmonalis&lt;br /&gt;
	| Image: &amp;lt;nowiki&amp;gt;{{Heart diagram 250px}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
	| Caption: Anterior (frontal) view of the opened heart. (Pulmonary artery upper right.)&lt;br /&gt;
	| Image2: Alveoli diagram.png&lt;br /&gt;
	| Caption2: Diagram of the alveoli with both cross-section and external view.&lt;br /&gt;
	| BranchFrom: &amp;lt;nowiki&amp;gt;[[right ventricle]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
	| BranchTo:&lt;br /&gt;
	| Vein: &amp;lt;nowiki&amp;gt;[[pulmonary vein]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
	| Precursor: truncus arteriosus&lt;br /&gt;
	| Supplies:&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
Test cases:&lt;br /&gt;
&lt;br /&gt;
* List only the parameters whose names match against the &amp;lt;code&amp;gt;^Image&amp;lt;/code&amp;gt; pattern:&lt;br /&gt;
*: ↳ &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|setting|ih/p|{{!}}|{{=}}|with_name_matching|^Image|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*:: ↳ {{highlight round|bc=#ff9|&amp;lt;nowiki&amp;gt;|Image={{Heart diagram 250px}}|Image2=Alveoli diagram.png&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
* List the parameters whose names match against both patterns &amp;lt;code&amp;gt;^Image&amp;lt;/code&amp;gt; &#039;&#039;&#039;and&#039;&#039;&#039; &amp;lt;code&amp;gt;%d+$&amp;lt;/code&amp;gt;:&lt;br /&gt;
*: ↳ &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|setting|ih/p|{{!}}|{{=}}|with_name_matching|^Image|with_name_matching|%d+$|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*:: ↳ {{highlight round|bc=#ff9|&amp;lt;nowiki&amp;gt;|Image2=Alveoli diagram.png&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
* List the parameters whose names match against either the &amp;lt;code&amp;gt;^Name&amp;lt;/code&amp;gt; &#039;&#039;&#039;or&#039;&#039;&#039; the &amp;lt;code&amp;gt;^Latin$&amp;lt;/code&amp;gt; pattern:&lt;br /&gt;
*: ↳ &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|setting|ih/p|{{!}}|{{=}}|with_name_matching|^Name$|or|^Latin$|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*:: ↳ {{highlight round|bc=#ff9|&amp;lt;nowiki&amp;gt;|Latin=truncus pulmonalis, arteria pulmonalis|Name=Pulmonary artery&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
* List the parameters whose names match against either the &amp;lt;code&amp;gt;ma&amp;lt;/code&amp;gt; plain string &#039;&#039;&#039;or&#039;&#039;&#039; the &amp;lt;code&amp;gt;me$&amp;lt;/code&amp;gt; pattern:&lt;br /&gt;
*: ↳ &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|setting|ih/p|{{!}}|{{=}}|with_name_matching|ma|plain|or|me$|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*:: ↳ {{highlight round|bc=#ff9|&amp;lt;nowiki&amp;gt;|Image={{Heart diagram 250px}}|Name=Pulmonary artery|Image2=Alveoli diagram.png&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
Using &amp;lt;code&amp;gt;with_name_matching&amp;lt;/code&amp;gt; it is easy to emulate the behaviour of [[Module:Enumerate]] (or similar modules). For instance, the following examples creates a bullet list of all the parameters passed of type &amp;lt;code&amp;gt;&amp;amp;#124;foobar1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;#124;foobar2&amp;lt;/code&amp;gt; … &amp;lt;code&amp;gt;&amp;amp;#124;foobarN&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|all_sorted|with_name_matching|^foobar%d+$|setting|ih|&lt;br /&gt;
* |list_values}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is possible to see this example live at &amp;amp;#123;&amp;amp;#123;{{rel|Module:Params/doc/examples/enumerate}}&amp;amp;#125;&amp;amp;#125;.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} The &#039;&#039;target&#039;&#039; arguments passed to this modifier will not be trimmed of their leading and trailing spaces. The &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pattern&amp;lt;/code&amp;gt; keywords, and the &amp;lt;code&amp;gt;with_name_matching&amp;lt;/code&amp;gt; modifier name itself, however, will be trimmed of their surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;with_name_not_matching&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;with_name_not_matching&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|with_name_not_matching|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#excluding_numeric_names|excluding_numeric_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#excluding_non-numeric_names|excluding_non-numeric_names]]&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt;[[#with_name_matching|with_name_matching]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#with_value_matching|with_value_matching]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#with_value_not_matching|with_value_not_matching]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Discard all parameters whose name &#039;&#039;matches &#039;&#039;&#039;all&#039;&#039;&#039;&#039;&#039; the given patterns&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|with_name_not_matching|target 1|[plain flag 1]|[and]|[target 2]|[plain flag 2]|[and]|[...]|[target N]|[plain flag N]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Internally this modifier uses Lua&#039;s &amp;lt;code&amp;gt;[[:mw:Extension:Scribunto/Lua reference manual#string.find|string.find()]]&amp;lt;/code&amp;gt; function to find whether parameter names match against given patterns; therefore, unless a plain flag is set, please use the same syntax of [[:mw:Extension:Scribunto/Lua reference manual#Patterns|Lua patterns]]. The plain flag can be either &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; or omitted. When omitted it is assumed that the target string is a Lua pattern. The difference between &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; is that the latter also requires that the lengths match (this happens only when the two strings are 100% identical). In order to facilitate wikitext scripting in the &#039;&#039;plain flag&#039;&#039; argument, the &amp;lt;code&amp;gt;pattern&amp;lt;/code&amp;gt; keyword is available too, equivalent to omitting the argument.&lt;br /&gt;
&lt;br /&gt;
To express a [[Disjunction (logical connective)|logical OR]] the &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt; keyword is available. To express a [[Logical conjunction|logical AND]] instead, concatenate more invocations of &amp;lt;code&amp;gt;with_name_not_matching&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
For the sake of argument we will imagine that we are invoking &amp;lt;code&amp;gt;with_name_not_matching&amp;lt;/code&amp;gt; from within the {{tl|Infobox artery}} template, and this is being transcluded using the same parameters that we had imagined in the previous example at &amp;lt;code&amp;gt;[[#with_name_matching|with_name_matching]]&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* List only the parameters whose names do not match against the &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; pattern:&lt;br /&gt;
*: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|setting|ih/p|{{!}}|{{=}}|with_name_not_matching|a|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*:: ↳ {{highlight round|bc=#ff9|&amp;lt;nowiki&amp;gt;|Precursor=truncus arteriosus|Supplies=|Vein=pulmonary vein&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
* List the parameters whose names do not match against the &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; plain string &#039;&#039;&#039;and&#039;&#039;&#039; do not match against the &amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt; plain string either:&lt;br /&gt;
*: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|setting|ih/p|{{!}}|{{=}}|with_name_not_matching|a|plain|with_name_not_matching|l|plain|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*:: ↳ {{highlight round|bc=#ff9|&amp;lt;nowiki&amp;gt;|Precursor=truncus arteriosus|Vein=pulmonary vein&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
* List the parameters whose names do not match against either the &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; plain string &#039;&#039;&#039;or&#039;&#039;&#039; the &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; plain string:&lt;br /&gt;
*: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|setting|ih/p|{{!}}|{{=}}|with_name_not_matching|a|plain|or|n|plain|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*:: ↳ {{highlight round|bc=#ff9|&amp;lt;nowiki&amp;gt;|Precursor=truncus arteriosus|Supplies=|Image={{Heart diagram 250px}}|Name=Pulmonary artery|Image2=Alveoli diagram.png|Vein=pulmonary vein&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{N.b.}} For the sake of efficiency, please don&#039;t use this modifier with the &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; flag unless accompanied by &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;, use &amp;lt;code&amp;gt;[[#discarding|discarding]]&amp;lt;/code&amp;gt; instead!&lt;br /&gt;
&lt;br /&gt;
{{A note}} The &#039;&#039;target&#039;&#039; arguments passed to this modifier will not be trimmed of their leading and trailing spaces. The &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pattern&amp;lt;/code&amp;gt; keywords, and the &amp;lt;code&amp;gt;with_name_not_matching&amp;lt;/code&amp;gt; modifier name itself, however, will be trimmed of their surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;with_value_matching&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;with_value_matching&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|with_value_matching|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#with_name_matching|with_name_matching]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#with_name_not_matching|with_name_not_matching]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#with_value_not_matching|with_value_not_matching]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Discard all parameters whose value &#039;&#039;does not match &#039;&#039;&#039;any&#039;&#039;&#039;&#039;&#039; of the given patterns&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|with_value_matching|target 1|[plain flag 1]|[or]|[target 2]|[plain flag 2]|[or]|[...]|[target N]|[plain flag N]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exactly like &amp;lt;code&amp;gt;[[#with_name_matching|with_name_matching]]&amp;lt;/code&amp;gt;, but applied to parameter values instead of names.&lt;br /&gt;
&lt;br /&gt;
Internally this modifier uses Lua&#039;s &amp;lt;code&amp;gt;[[:mw:Extension:Scribunto/Lua reference manual#string.find|string.find()]]&amp;lt;/code&amp;gt; function to find whether parameter names match against given patterns; therefore, unless a plain flag is set, please use the same syntax of [[:mw:Extension:Scribunto/Lua reference manual#Patterns|Lua patterns]]. The plain flag can be either &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; or omitted. When omitted it is assumed that the target string is a Lua pattern. The difference between &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; is that the latter also requires that the lengths match (this happens only when the two strings are 100% identical). In order to facilitate wikitext scripting in the &#039;&#039;plain flag&#039;&#039; argument, the &amp;lt;code&amp;gt;pattern&amp;lt;/code&amp;gt; keyword is available too, equivalent to omitting the argument.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|with_value_matching|banana|count}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} The &#039;&#039;target&#039;&#039; arguments passed to this modifier will not be trimmed of their leading and trailing spaces. The &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pattern&amp;lt;/code&amp;gt; keywords, and the &amp;lt;code&amp;gt;with_value_matching&amp;lt;/code&amp;gt; modifier name itself, however, will be trimmed of their surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;with_value_not_matching&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;with_value_not_matching&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|with_value_not_matching|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#with_name_matching|with_name_matching]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#with_name_not_matching|with_name_not_matching]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#with_value_matching|with_value_matching]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Discard all parameters whose value &#039;&#039;matches &#039;&#039;&#039;all&#039;&#039;&#039;&#039;&#039; the given patterns&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|with_value_not_matching|target 1|[plain flag 1]|[and]|[target 2]|[plain flag 2]|[and]|[...]|[target N]|[plain flag N]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exactly like &amp;lt;code&amp;gt;[[#with_name_not_matching|with_name_not_matching]]&amp;lt;/code&amp;gt;, but applied to parameter values instead of names.&lt;br /&gt;
&lt;br /&gt;
Internally this modifier uses Lua&#039;s &amp;lt;code&amp;gt;[[:mw:Extension:Scribunto/Lua reference manual#string.find|string.find()]]&amp;lt;/code&amp;gt; function to find whether parameter names match against given patterns; therefore, unless a plain flag is set, please use the same syntax of [[:mw:Extension:Scribunto/Lua reference manual#Patterns|Lua patterns]]. The plain flag can be either &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; or omitted. When omitted it is assumed that the target string is a Lua pattern. The difference between &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; is that the latter also requires that the lengths match (this happens only when the two strings are 100% identical). In order to facilitate wikitext scripting in the &#039;&#039;plain flag&#039;&#039; argument, the &amp;lt;code&amp;gt;pattern&amp;lt;/code&amp;gt; keyword is available too, equivalent to omitting the argument.&lt;br /&gt;
&lt;br /&gt;
For instance, before calling &amp;lt;code&amp;gt;[[#list|list]]&amp;lt;/code&amp;gt;, the following code will get rid of all blank parameters (i.e. parameters whose values contain only zero or more spaces):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|with_value_not_matching|^%s*$|setting|hi/p|{{!}}|{{=}}|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A typical use case of this modifier is that of purging all empty incoming parameters before calling another template, especially when this [[Help:Conditional expressions#Checking for template parameters|distinguishes between empty and undefined parameters]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|with_value_not_matching|^%s*$|concat_and_call|my template}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} The &#039;&#039;target&#039;&#039; arguments passed to this modifier will not be trimmed of their leading and trailing spaces. The &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pattern&amp;lt;/code&amp;gt; keywords, and the &amp;lt;code&amp;gt;with_value_not_matching&amp;lt;/code&amp;gt; modifier name itself, however, will be trimmed of their surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;trimming_values&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;trimming_values&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|trimming_values|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Remove leading and trailing spaces from values&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|trimming_values|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
Most modifiers are order-dependent, therefore placing &amp;lt;code&amp;gt;trimming_values&amp;lt;/code&amp;gt; in different positions can generate different results. For instance, imagining our &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template}}&amp;lt;/syntaxhighlight&amp;gt; being called with the following spaced arguments: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template| wanna | be | my | friend | ? }}&amp;lt;/syntaxhighlight&amp;gt;. If &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template}}&amp;lt;/syntaxhighlight&amp;gt; contained the following code,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|with_value_matching|%s+$|trimming_values|setting|i/p|{{!}}|{{=}}|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the following text would be printed: &amp;lt;code&amp;gt;1=wanna|2=be|3=my|4=friend|5=?&amp;lt;/code&amp;gt;. But if instead it contained the following code,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|trimming_values|with_value_matching|%s+$|setting|i/p|{{!}}|{{=}}|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
no arguments would be shown.&lt;br /&gt;
&lt;br /&gt;
Order affects also performance, and how many values will be trimmed of their leading and trailing spaces will depend on where &amp;lt;code&amp;gt;trimming_values&amp;lt;/code&amp;gt; is placed. For instance, if a template were invoked with 50 parameters and its code contained &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|trimming_values|cutting|-1|0|list}}&amp;lt;/syntaxhighlight&amp;gt;, first all its values would be trimmed of leading and trailing blank spaces and then its first 49 parameters would be discarded. On the other hand, writing &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|cutting|-1|0|trimming_values|list}}&amp;lt;/syntaxhighlight&amp;gt; would first discard 49 parameters and then trim the only value left, resulting in a more efficient code. As a general rule, placing &amp;lt;code&amp;gt;trimming_values&amp;lt;/code&amp;gt; as the last modifier is usually the best choice.&lt;br /&gt;
&lt;br /&gt;
In most cases placing &amp;lt;code&amp;gt;trimming_values&amp;lt;/code&amp;gt; together with &amp;lt;code&amp;gt;non-sequential&amp;lt;/code&amp;gt; will result in an empty call with no effects, because non-sequential parameters are normally stripped of their leading and trailing spaces by default – this however depends on the caller, and if the current template is being called by a module it is in theory possible in specific conditions for named parameters to retain their leading and trailing spaces (namely in non-sequential numeric parameters).&lt;br /&gt;
&lt;br /&gt;
Using &amp;lt;code&amp;gt;trimming_values&amp;lt;/code&amp;gt; makes this module behave like many Wikipedia modules behave. For example, if we wanted to emulate {{ml|Separated entries|main}}, writing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sequential|squeezing|trimming_values|setting|i|XXXX|list_values}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will be equivalent to writing,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:separated entries|main|separator=XXXX}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
whereas writing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sequential|squeezing|trimming_values|setting|i/l|XXXX|YYYY|list_values}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will be equivalent to writing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:separated entries|main|separator=XXXX|conjunction=YYYY}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;#123;&amp;amp;#123;{{rel|Module:Params/doc/examples/trim and call}}&amp;amp;#125;&amp;amp;#125; example template shows how to call any arbitrary template trimming all parameters beforehand.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;converting_values_to_lowercase&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;converting_values_to_lowercase&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|converting_values_to_lowercase|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_replacing|mapping_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Convert all parameter values to lower case&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|converting_values_to_lowercase|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
This modifier converts all parameter values to lower [[Letter case|case]]. It is identical to writing &amp;lt;code&amp;gt;...&amp;amp;#124;[[#mapping_by_magic|mapping_by_magic]]&amp;amp;#124;[[:mw:Help:Magic words#lc|lc]]&amp;amp;#124;...&amp;lt;/code&amp;gt;, but without the burden of calling a parser function.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;converting_values_to_uppercase&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;converting_values_to_uppercase&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|converting_values_to_uppercase|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_replacing|mapping_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Convert all parameter values to upper case&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|converting_values_to_uppercase|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
This modifier converts all parameter values to upper [[Letter case|case]]. It is identical to writing &amp;lt;code&amp;gt;...&amp;amp;#124;[[#mapping_by_magic|mapping_by_magic]]&amp;amp;#124;[[:mw:Help:Magic words#uc|uc]]&amp;amp;#124;...&amp;lt;/code&amp;gt;, but without the burden of calling a parser function.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;mapping_by_calling&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;mapping_by_calling&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|mapping_by_calling|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#call_for_each|call_for_each]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#call_for_each_value|call_for_each_value]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_replacing|mapping_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_calling|renaming_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_invoking|renaming_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_magic|renaming_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#grouping_by_calling|grouping_by_calling]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;[[Map (higher-order function)|Map]] all parameter values, replacing their content with the expansion of a given template repeatedly called with one parameter (the parameter&#039;s value)&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|mapping_by_calling|template name|[call style]|[let]|[...]|[number of additional parameters]|[parameter 1]|[parameter 2]|[...]|[parameter N]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier (temporarily) changes the content of the parameters the current template is being called with, replacing each of them with the text returned by another template. The latter will be repeatedly called with at least one parameter as first sequential parameter: the parameter&#039;s value.&lt;br /&gt;
&lt;br /&gt;
It is possible to pass the parameter&#039;s value as a different parameter, or pass the parameter&#039;s name as well, by specifying a &#039;&#039;call style flag&#039;&#039; immediately after the &#039;&#039;template name&#039;&#039; (see below).&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;call style flag&#039;&#039; or (if omitted) the &#039;&#039;template name&#039;&#039; is followed by one or more groups of three arguments led by the &amp;lt;code&amp;gt;let&amp;lt;/code&amp;gt; keyword (i.e. &amp;lt;code&amp;gt;let&amp;amp;#124;name&amp;amp;#124;value&amp;lt;/code&amp;gt;), these will be passed to the mapping template.&lt;br /&gt;
&lt;br /&gt;
If the last group of three arguments or (if omitted) the &#039;&#039;call style flag&#039;&#039; or (if omitted) the &#039;&#039;template name&#039;&#039; is followed by a number, this will be parsed as the amount of positional parameters to add. These will always follow the current parameter&#039;s name and/or value if any of the latter are passed using a numeric name greater than zero.&lt;br /&gt;
&lt;br /&gt;
In case of collisions, the parameters assigned via the &amp;lt;code&amp;gt;let&amp;lt;/code&amp;gt; keyword will be given precedence over everything else.&lt;br /&gt;
&lt;br /&gt;
For instance, before listing all parameters,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|mapping_by_calling|foobar|setting|i/p|{{!}}|{{=}}|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will replace each value with the expansion of &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{foobar|VALUE}}&amp;lt;/syntaxhighlight&amp;gt; (where &amp;lt;code&amp;gt;VALUE&amp;lt;/code&amp;gt; indicates each different value).&lt;br /&gt;
&lt;br /&gt;
On the other hand,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|mapping_by_calling|foobar|names_and_values|let|rice|nope|let|curry|lots!|2|hello|world|setting|i/p|{{!}}|{{=}}|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will do the same, but using the expansion of &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{foobar|NAME|VALUE|hello|world|rice=nope|curry=lots!}}&amp;lt;/syntaxhighlight&amp;gt; (where &amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;VALUE&amp;lt;/code&amp;gt; indicate each different name and value).&lt;br /&gt;
&lt;br /&gt;
Possible &#039;&#039;call style flags&#039;&#039; are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &#039;&#039;Call style flag&#039;&#039;&lt;br /&gt;
! Example&lt;br /&gt;
! Corresponding call&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;names_and_values&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|mapping_by_calling|example template|names_and_values|let|foo|bar|2|hello|world|setting|i/p|&amp;lt;br /&amp;gt;| → |list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template|NAME|VALUE|hello|world|foo=bar}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;values_and_names&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|mapping_by_calling|example template|values_and_names|let|foo|bar|2|hello|world|setting|i/p|&amp;lt;br /&amp;gt;| → |list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template|VALUE|NAME|hello|world|foo=bar}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;names_only&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|mapping_by_calling|example template|names_only|let|foo|bar|2|hello|world|setting|i/p|&amp;lt;br /&amp;gt;| → |list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template|NAME|hello|world|foo=bar}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;values_only&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|mapping_by_calling|example template|values_only|let|foo|bar|2|hello|world|setting|i/p|&amp;lt;br /&amp;gt;| → |list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template|VALUE|hello|world|foo=bar}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;names_and_values_as&amp;amp;#124;...&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|mapping_by_calling|example template|names_and_values_as|my_name|my_value|let|foo|bar|2|hello|world|setting|i/p|&amp;lt;br /&amp;gt;| → |list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template|hello|world|my_name=NAME|my_value=VALUE|foo=bar}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;names_only_as&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|mapping_by_calling|example template|names_only_as|my_name|let|foo|bar|2|hello|world|setting|i/p|&amp;lt;br /&amp;gt;| → |list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template|hello|world|my_name=NAME|foo=bar}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;values_only_as&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|mapping_by_calling|example template|values_only_as|my_value|let|foo|bar|2|hello|world|setting|i/p|&amp;lt;br /&amp;gt;| → |list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template|hello|world|my_value=VALUE|foo=bar}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;blindly&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|mapping_by_calling|example template|blindly|let|foo|bar|2|hello|world|setting|i/p|&amp;lt;br /&amp;gt;| → |list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template|hello|world|foo=bar}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;call style flags&#039;&#039; argument is omitted it defaults to &amp;lt;code&amp;gt;values_only&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this modifier except the &amp;lt;code&amp;gt;mapping_by_calling&amp;lt;/code&amp;gt; modifier name itself, the &#039;&#039;template name&#039;&#039;, the &#039;&#039;call style flag&#039;&#039;, the &amp;lt;code&amp;gt;let&amp;lt;/code&amp;gt; keyword, the passed parameter names, and the number of additional parameters will not be trimmed of their leading and trailing spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;mapping_by_invoking&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;mapping_by_invoking&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|mapping_by_invoking|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#invoke_for_each|invoke_for_each]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#invoke_for_each_value|invoke_for_each_value]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_replacing|mapping_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_calling|renaming_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_invoking|renaming_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_magic|renaming_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#grouping_by_calling|grouping_by_calling]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;[[Map (higher-order function)|Map]] all parameter values, replacing their content with the text returned by a given module function repeatedly invoked with at least one argument (the parameter&#039;s value)&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|mapping_by_invoking|module name|function name|[call style]|[let]|[...]|[number of additional arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier (temporarily) changes the content of the parameters the current template is being called with, replacing each of them with the text returned by a custom module function. The latter will be repeatedly called with at least one argument as first sequential argument: the parameter&#039;s value.&lt;br /&gt;
&lt;br /&gt;
It is possible to pass the parameter&#039;s value as a different argument, or pass the parameter&#039;s name as well, by specifying a &#039;&#039;call style flag&#039;&#039; immediately after the &#039;&#039;function name&#039;&#039; (see &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt; for the list of possible flags). If omitted, the &#039;&#039;call style flags&#039;&#039; argument defaults to &amp;lt;code&amp;gt;values_only&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;call style flag&#039;&#039; or (if omitted) the &#039;&#039;function name&#039;&#039; is followed by one or more groups of three arguments led by the &amp;lt;code&amp;gt;let&amp;lt;/code&amp;gt; keyword (i.e. &amp;lt;code&amp;gt;let&amp;amp;#124;name&amp;amp;#124;value&amp;lt;/code&amp;gt;), these will be passed to the mapping module function.&lt;br /&gt;
&lt;br /&gt;
If the last group of three arguments or (if omitted) the &#039;&#039;call style flag&#039;&#039; or (if omitted) the &#039;&#039;function name&#039;&#039; is followed by a number, this will be parsed as the amount of positional parameters to add. These will always follow the current parameter&#039;s name and/or value if any of the latter are passed using a numeric name greater than zero.&lt;br /&gt;
&lt;br /&gt;
In case of collisions, the arguments assigned via the &amp;lt;code&amp;gt;let&amp;lt;/code&amp;gt; keyword will be given precedence over everything else.&lt;br /&gt;
&lt;br /&gt;
For instance, before listing all parameters,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|mapping_by_invoking|foobar|main|setting|i/p|{{!}}|{{=}}|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will replace each value with the expansion of &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:foobar|main|VALUE}}&amp;lt;/syntaxhighlight&amp;gt; (where &amp;lt;code&amp;gt;VALUE&amp;lt;/code&amp;gt; indicates each different value).&lt;br /&gt;
&lt;br /&gt;
On the other hand,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|mapping_by_invoking|foobar|main|names_and_values|let|rice|nope|let|curry|lots!|2|hello|world|setting|i/p|{{!}}|{{=}}|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will do the same, but using the expansion of &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:foobar|main|NAME|VALUE|hello|world|rice=nope|curry=lots!}}&amp;lt;/syntaxhighlight&amp;gt; (where &amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;VALUE&amp;lt;/code&amp;gt; indicate each different name and value).&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this modifier except the &amp;lt;code&amp;gt;mapping_by_invoking&amp;lt;/code&amp;gt; modifier name itself, the &#039;&#039;module name&#039;&#039;, the &#039;&#039;function name&#039;&#039;, the &#039;&#039;call style flag&#039;&#039;, the &amp;lt;code&amp;gt;let&amp;lt;/code&amp;gt; keyword, the passed parameter names, and the number of additional arguments will not be trimmed of their leading and trailing spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;mapping_by_magic&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;mapping_by_magic&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|mapping_by_magic|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#magic_for_each|magic_for_each]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#magic_for_each_value|magic_for_each_value]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_replacing|mapping_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_calling|renaming_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_invoking|renaming_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_magic|renaming_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#grouping_by_calling|grouping_by_calling]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;[[Map (higher-order function)|Map]] all parameter values, replacing their content with the expansion of a given parser function repeatedly called with at least one argument (the parameter&#039;s value)&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|mapping_by_magic|parser function|[call style]|[let]|[...]|[number of additional arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier (temporarily) changes the content of the parameters the current template is being called with, replacing each of them with the text returned by a [[:mw:Help:Magic words#Parser functions|parser function]]. The latter will be repeatedly called with at least one argument as first sequential argument: the parameter&#039;s value.&lt;br /&gt;
&lt;br /&gt;
It is possible to pass the parameter&#039;s value as a different argument, or pass the parameter&#039;s name as well, by specifying a &#039;&#039;call style flag&#039;&#039; immediately after the &#039;&#039;parser function name&#039;&#039; (see &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt; for the list of possible flags). If omitted, the &#039;&#039;call style flags&#039;&#039; argument defaults to &amp;lt;code&amp;gt;values_only&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;call style flag&#039;&#039; or (if omitted) the &#039;&#039;template name&#039;&#039; is followed by one or more groups of three arguments led by the &amp;lt;code&amp;gt;let&amp;lt;/code&amp;gt; keyword (i.e. &amp;lt;code&amp;gt;let&amp;amp;#124;name&amp;amp;#124;value&amp;lt;/code&amp;gt;), these will be passed to the parser function.&lt;br /&gt;
&lt;br /&gt;
If the last group of three arguments or (if omitted) the &#039;&#039;call style flag&#039;&#039; or (if omitted) the &#039;&#039;template name&#039;&#039; is followed by a number, this will be parsed as the amount of positional arguments to add. These will always follow the current parameter&#039;s name and/or value if any of the latter are passed using a numeric name greater than zero.&lt;br /&gt;
&lt;br /&gt;
In case of collisions, the arguments assigned via the &amp;lt;code&amp;gt;let&amp;lt;/code&amp;gt; keyword will be given precedence over everything else.&lt;br /&gt;
&lt;br /&gt;
For instance, before listing all parameters,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|mapping_by_magic|uc|setting|i/p|{{!}}|{{=}}|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will replace each value with the expansion of &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{uc:VALUE}}&amp;lt;/syntaxhighlight&amp;gt; (where &amp;lt;code&amp;gt;VALUE&amp;lt;/code&amp;gt; indicates each different value).&lt;br /&gt;
&lt;br /&gt;
On the other hand,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|mapping_by_magic|plural|names_and_values|1|They are many|setting|i/p|{{!}}|{{=}}|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will do the same, but using the expansion of &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{plural:NAME|VALUE|They are many}}&amp;lt;/syntaxhighlight&amp;gt; (where &amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;VALUE&amp;lt;/code&amp;gt; indicate each different name and value).&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this modifier except the &amp;lt;code&amp;gt;mapping_by_magic&amp;lt;/code&amp;gt; modifier name itself, the parser function&#039;s name, the &#039;&#039;call style flag&#039;&#039;, the &amp;lt;code&amp;gt;let&amp;lt;/code&amp;gt; keyword, the passed parameter names, and the number of additional arguments will not be trimmed of their leading and trailing spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;mapping_by_replacing&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;mapping_by_replacing&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|mapping_by_replacing|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 2–4&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#mapping_by_mixing|mapping_by_mixing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_calling|renaming_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_invoking|renaming_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_magic|renaming_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_mixing|renaming_by_mixing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#grouping_by_calling|grouping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mixing_names_and_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;[[Map (higher-order function)|Map]] all parameter values performing [[String operations#String substitution|string substitutions]]&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|mapping_by_replacing|target|replace|[count]|[plain flag]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier (temporarily) changes the content of the parameters the current template is being called with, replacing each of them with the result of a string substitution. Its syntax is very simlar to {{mfl|string|replace}}.&lt;br /&gt;
&lt;br /&gt;
Internally the modifier uses Lua&#039;s &amp;lt;code&amp;gt;[[:mw:Extension:Scribunto/Lua reference manual#string.gsub|string.gsub()]]&amp;lt;/code&amp;gt; function to perform substitutions; therefore, unless a &#039;&#039;plain flag&#039;&#039; is set, please use the same syntax of [[:mw:Extension:Scribunto/Lua reference manual#Patterns|Lua patterns]]. The &#039;&#039;plain flag&#039;&#039; can be either &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; or omitted. When omitted it is assumed that the target string is a Lua pattern. The difference between &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; is that the latter also requires that the lengths match (this happens only when the two strings are 100% identical). In &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; mode the &#039;&#039;replace&#039;&#039; argument will not accept directives (e.g. &amp;lt;code&amp;gt;%0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%1&amp;lt;/code&amp;gt;, etc.). In order to facilitate wikitext scripting in the &#039;&#039;plain flag&#039;&#039; argument, the &amp;lt;code&amp;gt;pattern&amp;lt;/code&amp;gt; keyword is available too, equivalent to omitting the argument.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;count&#039;&#039; argument prescribes how many substitutions will be performed at most. If blank or omitted, all matches found will be substituted.&lt;br /&gt;
&lt;br /&gt;
This modifier uses &amp;lt;code&amp;gt;[[:mw:Extension:Scribunto/Lua reference manual#string.gsub|string.gsub()]]&amp;lt;/code&amp;gt; for performance reasons; if you need to use &amp;lt;code&amp;gt;[[:mw:Extension:Scribunto/Lua reference manual#mw.ustring.gsub|mw.ustring.gsub()]]&amp;lt;/code&amp;gt; instead, you will need to invoke the &amp;lt;code&amp;gt;[[Module:String#replace|replace]]&amp;lt;/code&amp;gt; function from [[Module:String]] via &amp;lt;code&amp;gt;...&amp;amp;#124;[[#mapping_by_invoking|mapping_by_invoking]]&amp;amp;#124;[[Module:String|string]]&amp;amp;#124;[[Module:String#replace|replace]]&amp;amp;#124;...&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following table shows examples of equivalent instructions. Please be aware that invoking &amp;lt;code&amp;gt;[[:mw:Extension:Scribunto/Lua reference manual#mw.ustring.gsub|mw.ustring.gsub()]]&amp;lt;/code&amp;gt; can be much slower.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;code&amp;gt;[[:mw:Extension:Scribunto/Lua reference manual#string.gsub|string.gsub()]]&amp;lt;/code&amp;gt;&lt;br /&gt;
! &amp;lt;code&amp;gt;[[:mw:Extension:Scribunto/Lua reference manual#mw.ustring.gsub|mw.ustring.gsub()]]&amp;lt;/code&amp;gt; (via [[Module:String]])&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;...&amp;amp;#124;mapping_by_replacing&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;...&amp;amp;#124;mapping_by_invoking&amp;amp;#124;string&amp;amp;#124;replace&amp;amp;#124;4&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;&amp;amp;#124;false&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;...&amp;amp;#124;mapping_by_replacing&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;count&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;...&amp;amp;#124;mapping_by_invoking&amp;amp;#124;string&amp;amp;#124;replace&amp;amp;#124;4&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;count&amp;amp;#124;false&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;...&amp;amp;#124;mapping_by_replacing&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;plain&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;...&amp;amp;#124;mapping_by_invoking&amp;amp;#124;string&amp;amp;#124;replace&amp;amp;#124;2&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;...&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;or, equivalently,&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;...&amp;amp;#124;mapping_by_invoking&amp;amp;#124;string&amp;amp;#124;replace&amp;amp;#124;4&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;&amp;amp;#124;true&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;...&amp;amp;#124;mapping_by_replacing&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;count&amp;amp;#124;plain&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;...&amp;amp;#124;mapping_by_invoking&amp;amp;#124;string&amp;amp;#124;replace&amp;amp;#124;3&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;count&amp;amp;#124;...&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;or, equivalently,&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;...&amp;amp;#124;mapping_by_invoking&amp;amp;#124;string&amp;amp;#124;replace&amp;amp;#124;4&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;count&amp;amp;#124;true&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is not a corresponding translation for the &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; flag in [[Module:String]]. However, as it goes with the &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt; flag, in that case you won&#039;t need &amp;lt;code&amp;gt;[[:mw:Extension:Scribunto/Lua reference manual#mw.ustring.gsub|mw.ustring.gsub()]]&amp;lt;/code&amp;gt; in the first place.&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;...|mapping_by_renaming|foo|bar|1|...&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will be equivalent to writing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;...|mapping_by_invoking|string|replace|4|foo|bar|1|false|...&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first syntax, however, will be less computationally expensive.&lt;br /&gt;
&lt;br /&gt;
At &amp;amp;#123;&amp;amp;#123;{{rel|Module:Params/doc/examples/informal tablebox}}&amp;amp;#125;&amp;amp;#125; you can find an example on how to exploit this function to create “informal” [[Template:Infobox|infoboxes]].&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} The &#039;&#039;target&#039;&#039; and &#039;&#039;replace&#039;&#039; arguments passed to this modifier will not be trimmed of their leading and trailing spaces. The &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pattern&amp;lt;/code&amp;gt; keywords, the &#039;&#039;count&#039;&#039; argument, and the &amp;lt;code&amp;gt;mapping_by_replacing&amp;lt;/code&amp;gt; modifier name itself, however, will be trimmed of their surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;mapping_by_mixing&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;mapping_by_mixing&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|mapping_by_mixing|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 1&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;!--&amp;lt;code&amp;gt;[[#mapping_to_names|mapping_to_names]]&amp;lt;/code&amp;gt;, --&amp;gt;&amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_calling|renaming_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_invoking|renaming_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_magic|renaming_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_mixing|renaming_by_mixing]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#renaming_to_values|renaming_to_values]]&amp;lt;/code&amp;gt;--&amp;gt;, &amp;lt;code&amp;gt;[[#grouping_by_calling|grouping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mixing_names_and_values|mixing_names_and_values]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#swapping_names_and_values|swapping_names_and_values]]&amp;lt;/code&amp;gt;--&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;[[Map (higher-order function)|Map]] all parameter values replacing their current values with the expansion of a custom string containing the &amp;lt;code&amp;gt;$#&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$@&amp;lt;/code&amp;gt; placeholders&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|mapping_by_mixing|mixing string|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier (temporarily) changes the content of the parameters the current template is being called with, replacing each of them with the expansion of a custom string that expects the same syntax as the &amp;lt;code&amp;gt;[[#for_each|for_each]]&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
For instance, the following code will wrap all parameter values in quotes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;...|mapping_by_mixing|“$@”|...&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
whereas the following code will replace all values with the string &amp;lt;code&amp;gt;&amp;amp;#91;NAME::VALUE&amp;amp;#93;&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;VALUE&amp;lt;/code&amp;gt; are each parameter&#039;s name and value:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;...|mapping_by_mixing|[$#::$@]|...&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
If you need to map all parameters exactly matching their names, please use &amp;lt;code&amp;gt;[[#mapping_to_names|mapping_to_names]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} Both the &#039;&#039;mixing string&#039;&#039; argument and the &amp;lt;code&amp;gt;mapping_by_mixing&amp;lt;/code&amp;gt; modifier name itself will be trimmed of their surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== &amp;lt;code&amp;gt;mapping_to_names&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;mapping_to_names&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|mapping_to_names|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#mapping_by_mixing|mapping_by_mixing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_calling|renaming_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_invoking|renaming_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_magic|renaming_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_mixing|renaming_by_mixing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_to_values|renaming_to_values]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#grouping_by_calling|grouping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mixing_names_and_values|mixing_names_and_values]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#swapping_names_and_values|swapping_names_and_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;[[Map (higher-order function)|Map]] all parameter values, replacing the latter with their parameter name&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|mapping_to_names|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
After calling this modifier, all parameters will have their value identical to their name. It is a shortcut for &amp;lt;code&amp;gt;...&amp;amp;#124;[[#mapping_by_mixing|mapping_by_mixing]]&amp;amp;#124;$#&amp;amp;#124;...&amp;lt;/code&amp;gt;, but slightly more efficient.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} The &amp;lt;code&amp;gt;mapping_to_names&amp;lt;/code&amp;gt; modifier name will be trimmed of its surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;converting_names_to_lowercase&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;converting_names_to_lowercase&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|converting_names_to_lowercase|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_replacing|mapping_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Convert all parameter names to lower case&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|converting_names_to_lowercase|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
This modifier converts all parameter names to lower [[Letter case|case]]. It is identical to writing &amp;lt;code&amp;gt;...&amp;amp;#124;[[#renaming_by_magic|renaming_by_magic]]&amp;amp;#124;[[:mw:Help:Magic words#lc|lc]]&amp;amp;#124;...&amp;lt;/code&amp;gt;, but without the burden of calling a parser function.&lt;br /&gt;
&lt;br /&gt;
{{A note}} In case of collisions between identical names, only one parameter, randomly chosen, will be left for a given name.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;converting_names_to_uppercase&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;converting_names_to_uppercase&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|converting_names_to_uppercase|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_replacing|mapping_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Convert all parameter names to upper case&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|converting_names_to_uppercase|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
This modifier converts all parameter names to upper [[Letter case|case]]. It is identical to writing &amp;lt;code&amp;gt;...&amp;amp;#124;[[#renaming_by_magic|renaming_by_magic]]&amp;amp;#124;[[:mw:Help:Magic words#uc|uc]]&amp;amp;#124;...&amp;lt;/code&amp;gt;, but without the burden of calling a parser function.&lt;br /&gt;
&lt;br /&gt;
{{A note}} In case of collisions between identical names, only one parameter, randomly chosen, will be left for a given name.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;renaming_by_calling&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;renaming_by_calling&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|renaming_by_calling|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_replacing|mapping_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_invoking|renaming_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_magic|renaming_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#grouping_by_calling|grouping_by_calling]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Rename all parameters, replacing their former names with the expansion of a given template repeatedly called with at least one parameter (the parameter&#039;s former name)&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|renaming_by_calling|template name|[call style]|[let]|[...]|[number of additional parameters]|[parameter 1]|[parameter 2]|[...]|[parameter N]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier works similarly to &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, but instead of replacing parameters&#039; values &#039;&#039;&#039;it renames the parameters themselves&#039;&#039;&#039;. Care must be used knowing that if a new name collides with another new name one of the two parameters will be removed without knowing which one. New names and old names do not create collisions. If a name is returned identical it will be considered as “unchanged” and in case of conflicts the renamed one will prevail. Possible leading and trailing spaces in the new names are always stripped. Here, if omitted, the &#039;&#039;call style flags&#039;&#039; argument defaults to &amp;lt;code&amp;gt;names_only&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For instance, the following example uses {{tl|2x}} to rename all incoming parameters by doubling their names:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|setting|h/i/p/f|[|][|: |]|renaming_by_calling|2x|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same, but adding a hyphen in between:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|setting|h/i/p/f|[|][|: |]|renaming_by_calling|2x|1|-|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example calls the {{Tl|P1}} template to rename all parameters using their value as their new name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|renaming_by_calling|P1|values_only|for_each|[$#: $@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier can be particularly useful for sanitizing parameter names (e.g. collapsing several spaces into single spaces, changing the [[letter case]], and so on).&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this modifier except the &amp;lt;code&amp;gt;renaming_by_calling&amp;lt;/code&amp;gt; modifier name itself, the &#039;&#039;template name&#039;&#039;, the &#039;&#039;call style flag&#039;&#039;, the &amp;lt;code&amp;gt;let&amp;lt;/code&amp;gt; keyword, the passed parameter names, and the number of additional arguments will not be trimmed of their leading and trailing spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;renaming_by_invoking&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;renaming_by_invoking&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|renaming_by_invoking|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_replacing|mapping_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_calling|renaming_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_magic|renaming_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#grouping_by_calling|grouping_by_calling]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Rename all parameters, replacing their former names with the text returned by a given module function repeatedly called with at least one argument (the parameter&#039;s former name)&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|renaming_by_invoking|module name|function name|[call style]|[let]|[...]|[number of additional arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier works similarly to &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, but instead of replacing parameters&#039; values &#039;&#039;&#039;it renames the parameters themselves&#039;&#039;&#039;. Care must be used knowing that if a new name collides with another new name one of the two parameters will be removed without knowing which one. New names and old names do not create collisions. If a name is returned identical it will be considered as “unchanged” and in case of conflicts the renamed one will prevail. Possible leading and trailing spaces in the new names are always stripped. Here, if omitted, the &#039;&#039;call style flags&#039;&#039; argument defaults to &amp;lt;code&amp;gt;names_only&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For instance, the following example uses {{mfl|string|replace}} to rename all parameters of type {{para|arg1}}, {{para|arg2}}, … {{para|argN}} into {{para|1}}, {{para|2}} … {{para|N}}, thus creating a novel sequence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sequential|setting|h/i/p/f|[|][|: |]|with_name_matching|^arg%d+$|renaming_by_invoking|string|replace|4|^arg(%d+)$|%1|1|false|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier can be particularly useful for sanitizing parameter names (e.g. collapsing several spaces into single spaces, changing the [[letter case]], and so on).&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this modifier except the &amp;lt;code&amp;gt;renaming_by_invoking&amp;lt;/code&amp;gt; modifier name itself, the &#039;&#039;module name&#039;&#039;, the &#039;&#039;function name&#039;&#039;, the &#039;&#039;call style flag&#039;&#039;, the &amp;lt;code&amp;gt;let&amp;lt;/code&amp;gt; keyword, the passed parameter names, and the number of additional arguments will not be trimmed of their leading and trailing spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;renaming_by_magic&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;renaming_by_magic&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|renaming_by_magic|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_replacing|mapping_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_calling|renaming_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_invoking|renaming_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#grouping_by_calling|grouping_by_calling]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Rename all parameters, replacing their former names with the text returned by a given parser function repeatedly called with at least one argument (the parameter&#039;s former name)&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|renaming_by_magic|parser function|[call style]|[let]|[...]|[number of additional arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier works similarly to &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, but instead of replacing parameters&#039; values &#039;&#039;&#039;it renames the parameters themselves&#039;&#039;&#039;. Care must be used knowing that if a new name collides with another new name one of the two parameters will be removed without knowing which one. New names and old names do not create collisions. If a name is returned identical it will be considered as “unchanged” and in case of conflicts the renamed one will prevail. Possible leading and trailing spaces in the new names are always stripped. Here, if omitted, the &#039;&#039;call style flags&#039;&#039; argument defaults to &amp;lt;code&amp;gt;names_only&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For instance, the following example uses &amp;amp;#123;&amp;amp;#123;[[:mw:Special:MyLanguage/expr##expr|#expr]]&amp;amp;#125;&amp;amp;#125; to transform all numeric parameters into even numbers (you can replace the expression &amp;lt;code&amp;gt;%0 * 2&amp;lt;/code&amp;gt; with any other expression):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|all_sorted|excluding_non-numeric_names|renaming_by_replacing|^.*$|%0 * 2|1|renaming_by_magic|#expr|setting|h/i/p/f|[|][|: |]|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this modifier except the &amp;lt;code&amp;gt;renaming_by_magic&amp;lt;/code&amp;gt; modifier name itself, the &#039;&#039;parser function name&#039;&#039;, the &#039;&#039;call style flag&#039;&#039;, the &amp;lt;code&amp;gt;let&amp;lt;/code&amp;gt; keyword, the passed parameter names, and the number of additional arguments will not be trimmed of their leading and trailing spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;renaming_by_replacing&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;renaming_by_replacing&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|renaming_by_replacing|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 2–4&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#mapping_by_mixing|mapping_by_mixing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_replacing|mapping_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_calling|renaming_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_invoking|renaming_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_magic|renaming_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_mixing|renaming_by_mixing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#grouping_by_calling|grouping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mixing_names_and_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Rename all parameters, replacing their former names with the text returned by a [[String operations#String substitution|string substitutions]]&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|renaming_by_replacing|target|replace|[count]|[plain flag]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier works similarly to &amp;lt;code&amp;gt;[[#mapping_by_replacing|mapping_by_replacing]]&amp;lt;/code&amp;gt;, but instead of replacing parameters&#039; values &#039;&#039;&#039;it renames the parameters themselves&#039;&#039;&#039;. Care must be used knowing that if a new name collides with another new name one of the two parameters will be removed without knowing which one. New names and old names do not create collisions. If a name is returned identical it will be considered as “unchanged” and in case of conflicts the renamed one will prevail. Possible leading and trailing spaces in the new names are always stripped (however they are not stripped while searching for the name to replace).&lt;br /&gt;
&lt;br /&gt;
Since there can be only one parameter name that matches exactly a literal string, when used with the &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; flag this modifier directly accesses the requested key without looping through the entire list of parameters (so it will be much faster).&lt;br /&gt;
&lt;br /&gt;
For instance, the following example renames all parameters of type {{para|arg1}}, {{para|arg2}}, … {{para|argN}} into {{para|1}}, {{para|2}} … {{para|N}}, thus creating a novel sequence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|sequential|setting|h/i/p/f|[|][|: |]|with_name_matching|^arg%d+$|renaming_by_replacing|^arg(%d+)$|%1|1|list}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier can be particularly useful for sanitizing parameter names (e.g. collapsing several spaces into single spaces, changing the [[letter case]], and so on).&lt;br /&gt;
&lt;br /&gt;
For performance reasons this modifier uses &amp;lt;code&amp;gt;[[:mw:Extension:Scribunto/Lua reference manual#string.gsub|string.gsub()]]&amp;lt;/code&amp;gt;; if you need to use &amp;lt;code&amp;gt;[[:mw:Extension:Scribunto/Lua reference manual#mw.ustring.gsub|mw.ustring.gsub()]]&amp;lt;/code&amp;gt; instead, you will need to invoke the &amp;lt;code&amp;gt;[[Module:String#replace|replace]]&amp;lt;/code&amp;gt; function from [[Module:String]] via &amp;lt;code&amp;gt;...&amp;amp;#124;[[#renaming_by_invoking|renaming_by_invoking]]&amp;amp;#124;[[Module:String|string]]&amp;amp;#124;[[Module:String#replace|replace]]&amp;amp;#124;...&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following table shows examples of equivalent instructions. Please be aware that invoking &amp;lt;code&amp;gt;[[:mw:Extension:Scribunto/Lua reference manual#mw.ustring.gsub|mw.ustring.gsub()]]&amp;lt;/code&amp;gt; can be much slower.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;code&amp;gt;[[:mw:Extension:Scribunto/Lua reference manual#string.gsub|string.gsub()]]&amp;lt;/code&amp;gt;&lt;br /&gt;
! &amp;lt;code&amp;gt;[[:mw:Extension:Scribunto/Lua reference manual#mw.ustring.gsub|mw.ustring.gsub()]]&amp;lt;/code&amp;gt; (via [[Module:String]])&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;...&amp;amp;#124;renaming_by_replacing&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;...&amp;amp;#124;renaming_by_invoking&amp;amp;#124;string&amp;amp;#124;replace&amp;amp;#124;4&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;&amp;amp;#124;false&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;...&amp;amp;#124;renaming_by_replacing&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;count&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;...&amp;amp;#124;renaming_by_invoking&amp;amp;#124;string&amp;amp;#124;replace&amp;amp;#124;4&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;count&amp;amp;#124;false&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;...&amp;amp;#124;renaming_by_replacing&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;plain&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;...&amp;amp;#124;renaming_by_invoking&amp;amp;#124;string&amp;amp;#124;replace&amp;amp;#124;2&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;...&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;or, equivalently,&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;...&amp;amp;#124;renaming_by_invoking&amp;amp;#124;string&amp;amp;#124;replace&amp;amp;#124;4&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;&amp;amp;#124;true&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;...&amp;amp;#124;renaming_by_replacing&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;count&amp;amp;#124;plain&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;...&amp;amp;#124;renaming_by_invoking&amp;amp;#124;string&amp;amp;#124;replace&amp;amp;#124;3&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;count&amp;amp;#124;...&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;or, equivalently,&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;...&amp;amp;#124;renaming_by_invoking&amp;amp;#124;string&amp;amp;#124;replace&amp;amp;#124;4&amp;amp;#124;target&amp;amp;#124;replace&amp;amp;#124;count&amp;amp;#124;true&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is not a corresponding translation for the &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; flag in [[Module:String]]. However, as it goes with the &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt; flag, in that case you won&#039;t need &amp;lt;code&amp;gt;[[:mw:Extension:Scribunto/Lua reference manual#mw.ustring.gsub|mw.ustring.gsub()]]&amp;lt;/code&amp;gt; in the first place.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} The &#039;&#039;target&#039;&#039; and &#039;&#039;replace&#039;&#039; arguments passed to this modifier will not be trimmed of their leading and trailing spaces. The &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;plain&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;strict&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pattern&amp;lt;/code&amp;gt; keywords, the &#039;&#039;count&#039;&#039; argument, and the &amp;lt;code&amp;gt;mapping_by_replacing&amp;lt;/code&amp;gt; modifier name itself, however, will be trimmed of their surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;renaming_by_mixing&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;renaming_by_mixing&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|renaming_by_mixing|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 1&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;!--&amp;lt;code&amp;gt;[[#mapping_to_names|mapping_to_names]]&amp;lt;/code&amp;gt;, --&amp;gt;&amp;lt;code&amp;gt;[[#mapping_by_mixing|mapping_by_mixing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_calling|renaming_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_invoking|renaming_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_magic|renaming_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#renaming_to_values|renaming_to_values]]&amp;lt;/code&amp;gt;--&amp;gt;, &amp;lt;code&amp;gt;[[#grouping_by_calling|grouping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mixing_names_and_values|mixing_names_and_values]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#swapping_names_and_values|swapping_names_and_values]]&amp;lt;/code&amp;gt;--&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Rename all parameters, replacing their former names with the expansion of a custom string containing the &amp;lt;code&amp;gt;$#&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$@&amp;lt;/code&amp;gt; placeholders&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|renaming_by_mixing|mixing string|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier (temporarily) changes the content of the parameters the current template is being called with, replacing each of them with the expansion of a custom string that expects the same syntax as the &amp;lt;code&amp;gt;[[#for_each|for_each]]&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
For instance, the following code will wrap all parameter names in quotes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;...|renaming_by_mixing|“$#”|...&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
whereas the following code will replace all parameter names with the string &amp;lt;code&amp;gt;&amp;amp;#91;NAME::VALUE&amp;amp;#93;&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;VALUE&amp;lt;/code&amp;gt; are each parameter&#039;s name and value:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;...|renaming_by_mixing|[$#::$@]|...&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
If you need to rename all parameters exactly matching their values, please use &amp;lt;code&amp;gt;[[#renaming_to_values|renaming_to_values]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} The &#039;&#039;mixing string&#039;&#039; argument passed to this modifier will not be trimmed of its leading and trailing spaces. The &amp;lt;code&amp;gt;renaming_by_mixing&amp;lt;/code&amp;gt; modifier name itself, however, will be trimmed of their surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== &amp;lt;code&amp;gt;renaming_to_values&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;renaming_to_values&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|renaming_to_values|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#mapping_to_names|mapping_to_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_mixing|mapping_by_mixing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_calling|renaming_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_invoking|renaming_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_magic|renaming_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_mixing|renaming_by_mixing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#grouping_by_calling|grouping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mixing_names_and_values|mixing_names_and_values]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#swapping_names_and_values|swapping_names_and_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Rename all parameters, replacing their name with their current value&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|renaming_to_values|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
After calling this modifier, all parameters will have their name identical to their value. It is a shortcut for &amp;lt;code&amp;gt;...&amp;amp;#124;[[#renaming_by_mixing|renaming_by_mixing]]&amp;amp;#124;$@&amp;amp;#124;...&amp;lt;/code&amp;gt;, but slightly more efficient.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} The &amp;lt;code&amp;gt;renaming_to_values&amp;lt;/code&amp;gt; modifier name will be trimmed of its surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
=== &amp;lt;code&amp;gt;grouping_by_calling&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;grouping_by_calling&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|grouping_by_calling|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = &#039;&#039;Ad libitum&#039;&#039;&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&amp;lt;ref&amp;gt;Unless followed by &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt; in few bizarre situations, there is virtually no use in calling this modifier more than once.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#call_for_each_group|call_for_each_group]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_replacing|mapping_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_calling|renaming_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_invoking|renaming_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_magic|renaming_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Group the parameters that have the same numeric suffix into novel parameters, whose names will be numbers and whose values will be decided by a custom template&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|grouping_by_calling|template name|[let]|[...]|[number of additional arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the piping version of &amp;lt;code&amp;gt;[[#call_for_each_group|call_for_each_group]]&amp;lt;/code&amp;gt;. This means that after calling this modifier the old parameters will be (temporarily) gone and the only parameters left will be novel parameters whose names will be numbers (or an empty string if parameters without a numeric suffix were present) and whose content will be decided by a custom template.&lt;br /&gt;
&lt;br /&gt;
Like other modifiers in the &amp;lt;code&amp;gt;mapping_*&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;renaming_*&amp;lt;/code&amp;gt; family, it is possible to impose own parameters on the callback template by using the syntax &amp;lt;code&amp;gt;...|[let]|[...]|[number of additional arguments]|[argument 1]|[argument 2]|[...]|[argument N]|...&amp;lt;/code&amp;gt;. Unlike the other &amp;lt;code&amp;gt;mapping_*&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;renaming_*&amp;lt;/code&amp;gt; modifiers, however (but like &amp;lt;code&amp;gt;[[#call_for_each_group|call_for_each_group]]&amp;lt;/code&amp;gt;), sequential parameters here will not be prepended, but will &#039;&#039;replace&#039;&#039; possible parsed parameters.&lt;br /&gt;
&lt;br /&gt;
And so, writing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|...|grouping_by_calling|MY TEMPLATE|let|foo|bar|let|hello|world|3|one|two|three|list_values}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is identical to writing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|...|call_for_each_group|MY TEMPLATE|foo=bar|hello=world|one|two|three}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above the main difference will be that the first solution will allow to pass the newly grouped parameters at once to another template or module (via &amp;lt;code&amp;gt;[[#concat_and_call|concat_and_call]]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[[#concat_and_invoke|concat_and_invoke]]&amp;lt;/code&amp;gt;) or, if needed, perform further fine-tuning operations concerning the new parameters.&lt;br /&gt;
&lt;br /&gt;
Please refer to the documentation of &amp;lt;code&amp;gt;[[#call_for_each_group|call_for_each_group]]&amp;lt;/code&amp;gt; for further information on the parameters passed to the callback template.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this modifier except the &amp;lt;code&amp;gt;grouping_by_calling&amp;lt;/code&amp;gt; modifier name itself, the &#039;&#039;template name&#039;&#039;, the &amp;lt;code&amp;gt;let&amp;lt;/code&amp;gt; keyword, the passed parameter names, and the number of additional parameters will not be trimmed of their leading and trailing spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;parsing&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;parsing&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|parsing|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 1–6&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = Often accompanied by | data3 = &amp;lt;code&amp;gt;[[#new|new]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#new|new]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{mfl|ArrayList}}&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{tl|Array}}&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Create new parameters by parsing a parameter string&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|parsing|string to parse|[trim flag]|[iteration delimiter setter]|[...]|[key-value delimiter setter]|[...]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier allows to add an infinity of new parameters by using a parameter string. By default this expects &amp;lt;code&amp;gt;&amp;amp;#124;&amp;lt;/code&amp;gt; as separator between parameters and &amp;lt;code&amp;gt;&amp;amp;#61;&amp;lt;/code&amp;gt; as separator between keys and values, but it is possible to specify other strings or patterns. The parsed parameters will overwrite existing parameters of the same name. For this reason, the &amp;lt;code&amp;gt;[[#new|new]]&amp;lt;/code&amp;gt; directive often accompanies this modifier.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|new|parsing|one{{!}}two{{!}}three{{!}}foo{{=}}bar{{!}}hello{{=}}world|for_each|[$#:$@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*: ↳ {{#invoke:params|new|parsing|one{{!}}two{{!}}three{{!}}foo{{=}}bar{{!}}hello{{=}}world|for_each|[$#:$@]}}&lt;br /&gt;
* &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|new|parsing|one, two; three. foo: bar, hello: world|trim_all|splitter_pattern|[,;.]|setter_string|:|for_each|[$#:$@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*: ↳ {{#invoke:params|new|parsing|one, two; three. foo: bar, hello: world|trim_all|splitter_pattern|[,;.]|setter_string|:|for_each|[$#:$@]}}&lt;br /&gt;
* &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|new|parsing|one/two/ three / foo % bar /hello%world|setter_string|%|trim_none|splitter_string|/|for_each|[$#:$@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*: ↳ {{#invoke:params|new|parsing|one/two/ three / foo % bar /hello%world|setter_string|%|trim_none|splitter_string|/|for_each|[$#:$@]}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;trim flag&#039;&#039; argument can be placed in any position after the &#039;&#039;string to parse&#039;&#039; (not necessarily in second position) and can have one of the following values: &amp;lt;code&amp;gt;trim_none&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;trim_named&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;trim_positional&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;trim_all&amp;lt;/code&amp;gt;. If omitted, it defaults to &amp;lt;code&amp;gt;trim_named&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;iteration delimiter setter&#039;&#039; can be placed in any position after the &#039;&#039;string to parse&#039;&#039; (not necessarily in third position), must be &#039;&#039;immediately&#039;&#039; followed by a user-given string, and can be either &amp;lt;code&amp;gt;splitter_string&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;splitter_pattern&amp;lt;/code&amp;gt;. If omitted, the two arguments default to &amp;lt;code&amp;gt;splitter_string&amp;amp;#124;&amp;amp;#123;&amp;amp;#123;!&amp;amp;#125;&amp;amp;#125;&amp;lt;/code&amp;gt;. If the custom string is empty (but not if it is blank but not empty) the string to parse will be assumed not to have any iteration delimiters (this will result in one single parameter being parsed).&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;key-value delimiter setter&#039;&#039; can be placed in any position after the &#039;&#039;string to parse&#039;&#039; (not necessarily in fifth position), must be &#039;&#039;immediately&#039;&#039; followed by a user-given string, and can be either &amp;lt;code&amp;gt;setter_string&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;setter_pattern&amp;lt;/code&amp;gt;. If omitted, the two arguments default to &amp;lt;code&amp;gt;setter_string&amp;amp;#124;&amp;amp;#123;&amp;amp;#123;&amp;amp;#61;&amp;amp;#125;&amp;amp;#125;&amp;lt;/code&amp;gt;. If the custom string is empty (but not if it is blank but not empty) the string to parse will be assumed not to have any key-value delimiters (this will result in a sequence-only list of parameters being parsed).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto;&amp;quot;&lt;br /&gt;
|+ Possible options&lt;br /&gt;
|-&lt;br /&gt;
! Setting a trim flag&lt;br /&gt;
! Setting an iteration delimiter&lt;br /&gt;
! Setting a key-value delimiter&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;trim_none&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;code&amp;gt;trim_named&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;code&amp;gt;trim_positional&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;code&amp;gt;trim_all&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;splitter_string&amp;amp;#124;...&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;code&amp;gt;splitter_pattern&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;setter_string&amp;amp;#124;...&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;code&amp;gt;setter_pattern&amp;amp;#124;...&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this modifier except the &amp;lt;code&amp;gt;parsing&amp;lt;/code&amp;gt; modifier name itself, the &#039;&#039;trim flag&#039;&#039;, &#039;&#039;iteration delimiter setter&#039;&#039; and &#039;&#039;key-value delimiter setter&#039;&#039; arguments will not be trimmed of their leading and trailing spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;reinterpreting&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;reinterpreting&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|reinterpreting|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 1–6&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#parsing|parsing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{mfl|ArrayList}}&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{tl|Array}}&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Use the content of a parameter as a parameter string to parse, after removing the parameter itself&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|reinterpreting|parameter name|[trim flag]|[iteration delimiter setter]|[...]|[key-value delimiter setter]|[...]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier works exactly like &amp;lt;code&amp;gt;[[#parsing|parsing]]&amp;lt;/code&amp;gt;, but takes the content of a disposable parameter as input. See there for further information. The parameter passed to this modifier will be immediately deleted. The parsed parameters will overwrite existing parameters of the same name.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|new|pulling|1|reinterpreting|1|splitter_string|,|trim_all|concat_and_call|See also}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example that shows how to use this function to transclude a custom template with custom parameters is available at &amp;amp;#123;&amp;amp;#123;{{rel|Module:Params/doc/examples/constructed transclusion}}&amp;amp;#125;&amp;amp;#125;.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} All arguments passed to this modifier except the &amp;lt;code&amp;gt;reinterpreting&amp;lt;/code&amp;gt; modifier name itself, the &#039;&#039;parameter name&#039;&#039;, the &#039;&#039;trim flag&#039;&#039;, &#039;&#039;iteration delimiter setter&#039;&#039; and &#039;&#039;key-value delimiter setter&#039;&#039; arguments will not be trimmed of their leading and trailing spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;mixing_names_and_values&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;mixing_names_and_values&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|mixing_names_and_values|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 2&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;!--&amp;lt;code&amp;gt;[[#mapping_to_names|mapping_to_names]]&amp;lt;/code&amp;gt;, --&amp;gt;&amp;lt;code&amp;gt;[[#mapping_by_mixing|mapping_by_mixing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_calling|renaming_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_invoking|renaming_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_magic|renaming_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_mixing|renaming_by_mixing]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#renaming_to_values|renaming_to_values]]&amp;lt;/code&amp;gt;--&amp;gt;, &amp;lt;code&amp;gt;[[#grouping_by_calling|grouping_by_calling]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#swapping_names_and_values|swapping_names_and_values]]&amp;lt;/code&amp;gt;--&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Rewrite all parameters, replacing  names and values with the expansion of two custom strings containing the &amp;lt;code&amp;gt;$#&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$@&amp;lt;/code&amp;gt; placeholders&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|mixing_names_and_values|name mixing string|value mixing string|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier (temporarily) changes names and values of the parameters the current template is being called with, replacing each of them with the expansion of two custom strings that expect the same syntax as the &amp;lt;code&amp;gt;[[#for_each|for_each]]&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
For instance, the following code will wrap all parameter names and values in quotes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;...|mixing_names_and_values|“$#”|“$@”|...&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
whereas the following code will replace all names with the string &amp;lt;code&amp;gt;VALUE/NAME&amp;lt;/code&amp;gt; and all values with the string &amp;lt;code&amp;gt;&amp;amp;#91;NAME::VALUE&amp;amp;#93;&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;VALUE&amp;lt;/code&amp;gt; are each parameter&#039;s name and value:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;...|mixing_names_and_values|$@/$#|[$#::$@]|...&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
If you need to swap names and values verbatim, please use &amp;lt;code&amp;gt;[[#swapping_names_and_values|swapping_names_and_values]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} The &#039;&#039;value mixing string&#039;&#039; argument passed to this modifier will not be trimmed of its leading and trailing spaces. The &#039;&#039;name mixing string&#039;&#039; argument and &amp;lt;code&amp;gt;mixing_names_and_values&amp;lt;/code&amp;gt; modifier name itself, however, will be trimmed of their surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== &amp;lt;code&amp;gt;swapping_names_and_values&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;swapping_names_and_values&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|swapping_names_and_values|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#mapping_to_names|mapping_to_names]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_mixing|mapping_by_mixing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_lowercase|converting_values_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_values_to_uppercase|converting_values_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_calling|mapping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_invoking|mapping_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mapping_by_magic|mapping_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_lowercase|converting_names_to_lowercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#converting_names_to_uppercase|converting_names_to_uppercase]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_calling|renaming_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_invoking|renaming_by_invoking]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_magic|renaming_by_magic]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_replacing|renaming_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_by_mixing|renaming_by_mixing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#renaming_to_values|renaming_to_values]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#grouping_by_calling|grouping_by_calling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#mixing_names_and_values|mixing_names_and_values]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Rewrite all parameters swapping their names and values&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|swapping_names_and_values|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
This modifier is a shortcut for &amp;lt;code&amp;gt;...&amp;amp;#124;[[#mixing_names_and_values|mixing_names_and_values]]&amp;amp;#124;$@&amp;amp;#124;$#&amp;amp;#124;...&amp;lt;/code&amp;gt;, but slightly more efficient.&lt;br /&gt;
&lt;br /&gt;
{{vpad|clear=none}}&lt;br /&gt;
&lt;br /&gt;
{{A note}} The &amp;lt;code&amp;gt;swapping_names_and_values&amp;lt;/code&amp;gt; modifier name will be trimmed of its surrounding spaces.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;combining_by_calling&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;combining_by_calling&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|combining_by_calling|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 2&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#entering_substack|entering_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#remembering|remembering]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#concat_and_call|concat_and_call]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Pass all current parameters to a custom template and save the returned output as a new parameter&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|combining_by_calling|template name|new parameter name|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the piping version of &amp;lt;code&amp;gt;[[#concat_and_call|concat_and_call]]&amp;lt;/code&amp;gt;. This means that after calling this modifier the old parameters will be (temporarily) gone and the only parameter left will be what is specified in the &#039;&#039;new parameter name&#039;&#039; argument.&lt;br /&gt;
&lt;br /&gt;
Since after using this modifier all parameters will be grouped into one single parameter, to pass additional parameters to the callback template you can safely use &amp;lt;code&amp;gt;[[#imposing|imposing]]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[[#parsing|parsing]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For instance, using {{rel|Module:Params/testcases/tdummy echo sb}} as callback template, a template named &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template}}&amp;lt;/syntaxhighlight&amp;gt; with the following content,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|combining_by_calling|module:params/testcases/tdummy echo sb|my_new_param|for_each|[$#:$@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
when transcluded as &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template|one|two|three|hello=world|foo=bar}}&amp;lt;/syntaxhighlight&amp;gt; will produce&lt;br /&gt;
&lt;br /&gt;
: {{#invoke:params|new|&lt;br /&gt;
	imposing|1|one|&lt;br /&gt;
	imposing|2|two|&lt;br /&gt;
	imposing|3|three|&lt;br /&gt;
	imposing|hello|world|&lt;br /&gt;
	imposing|foo|bar|&lt;br /&gt;
	combining_by_calling|module:params/testcases/tdummy echo sb|my_new_param|for_each|[$#:$@]}}&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;snapshotting&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;snapshotting&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|snapshotting|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = Eventually followed by | data3 = Either &amp;lt;code&amp;gt;[[#entering_substack|entering_substack]]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[[#flushing|flushing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#remembering|remembering]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#entering_substack|entering_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#pulling|pulling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#merging_substack|merging_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#detaching_substack|detaching_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#leaving_substack|leaving_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#flushing|flushing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Push a copy of the current parameter list to the queue of parameter lists&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|snapshotting|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
This module has a stacking mechanism that allows to isolate groups of parameters, work separately on them, and then merge them back to the original stack. The modifiers dedicated to this mechanism are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[#remembering|remembering]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[#entering_substack|entering_substack]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[#pulling|pulling]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[#detaching_substack|detaching_substack]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[#leaving_substack|leaving_substack]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[#merging_substack|merging_substack]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[#flushing|flushing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every time the &amp;lt;code&amp;gt;snapshotting&amp;lt;/code&amp;gt; modifier is used, the current list of parameters (together with their values) will be copied and added to a queue. When the &amp;lt;code&amp;gt;[[#entering_substack|entering_substack]]&amp;lt;/code&amp;gt; modifier is used, the list of parameters on top of the queue will temporarily become the current parameters, and all other modifiers will affect only this substack. After completing the job, the &amp;lt;code&amp;gt;[[#merging_substack|merging_substack]]&amp;lt;/code&amp;gt; will merge the current substack to the parent stack.&lt;br /&gt;
&lt;br /&gt;
If no parameter lists have been snapshotted before calling &amp;lt;code&amp;gt;[[#entering_substack|entering_substack]]&amp;lt;/code&amp;gt;, the latter will automatically make a snapshot of the current parameters. Once inside a substack, it is possible to enter a subsubstack using the same machinery.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[#detaching_substack|detaching_substack]]&amp;lt;/code&amp;gt; modifier erases the current parameters from the parent stack, allowing the current stack to rename its parameters freely and merge them back to the parent stack, renamed.&lt;br /&gt;
&lt;br /&gt;
It is possible to leave a substack without merging it to the parent by using the &amp;lt;code&amp;gt;[[#leaving_substack|leaving_substack]]&amp;lt;/code&amp;gt; modifier. In this case, at some point it will be necessary to call &amp;lt;code&amp;gt;[[#flushing|flushing]]&amp;lt;/code&amp;gt; in order to merge the stack previously left unmerged. Alternatively, it will be possible to enter it again by calling &amp;lt;code&amp;gt;[[#entering_substack|entering_substack]]&amp;lt;/code&amp;gt;, and finally merge it via &amp;lt;code&amp;gt;[[#merging_substack|merging_substack]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
An example will probably clarify the mechanism better than anything else:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|new|&amp;lt;!-- Ignore the incoming parameters and manually assign some parameters (we will simulate the following incoming parameters: |one|two|three|four|foo=bar|hello=world ...) --&amp;gt;&lt;br /&gt;
	imposing|1|one|&lt;br /&gt;
	imposing|2|two|&lt;br /&gt;
	imposing|3|three|&lt;br /&gt;
	imposing|4|four|&lt;br /&gt;
	imposing|foo|bar|&lt;br /&gt;
	imposing|hello|world|&lt;br /&gt;
	entering_substack|&amp;lt;!-- Enter into a substack (the `snapshotting` modifier will be automatically invoked for us) --&amp;gt;&lt;br /&gt;
		excluding_numeric_names|&amp;lt;!-- Exclude numeric parameters --&amp;gt;&lt;br /&gt;
		detaching_substack|&amp;lt;!-- Remove the current parameters from the parent stack --&amp;gt;&lt;br /&gt;
		renaming_by_replacing|^.*$|This was called “%0”|1|&amp;lt;!-- Rename all parameters --&amp;gt;&lt;br /&gt;
	merging_substack|&lt;br /&gt;
	entering_substack|new|&amp;lt;!-- Enter into a new empty substack --&amp;gt;&lt;br /&gt;
		pulling|1|&amp;lt;!-- Pull the parameter named “1” from the parent stack --&amp;gt;&lt;br /&gt;
		mapping_by_replacing|^.*$|This value once was “%0”|1|&amp;lt;!-- Replace the content of all parameters --&amp;gt;&lt;br /&gt;
	merging_substack|&lt;br /&gt;
for_each|[$#:$@]}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above will result in:&lt;br /&gt;
&lt;br /&gt;
: {{#invoke:params|new|&amp;lt;!-- Ignore the incoming parameters and manually assign some parameters (we will simulate the following incoming parameters: |one|two|three|four|foo=bar|hello=world ...) --&amp;gt;&lt;br /&gt;
	imposing|1|one|&lt;br /&gt;
	imposing|2|two|&lt;br /&gt;
	imposing|3|three|&lt;br /&gt;
	imposing|4|four|&lt;br /&gt;
	imposing|foo|bar|&lt;br /&gt;
	imposing|hello|world|&lt;br /&gt;
	entering_substack|&amp;lt;!-- Enter into a substack (the `snapshotting` modifier will be automatically invoked for us) --&amp;gt;&lt;br /&gt;
		excluding_numeric_names|&amp;lt;!-- Exclude numeric parameters --&amp;gt;&lt;br /&gt;
		detaching_substack|&amp;lt;!-- Remove the current parameters from the parent stack --&amp;gt;&lt;br /&gt;
		renaming_by_replacing|^.*$|This was called “%0”|1|&amp;lt;!-- Rename all parameters --&amp;gt;&lt;br /&gt;
	merging_substack|&lt;br /&gt;
	entering_substack|new|&amp;lt;!-- Enter into a new empty substack --&amp;gt;&lt;br /&gt;
		pulling|1|&amp;lt;!-- Pull the parameter named “1” from the parent stack --&amp;gt;&lt;br /&gt;
		mapping_by_replacing|^.*$|This value once was “%0”|1|&amp;lt;!-- Replace the content of all parameters --&amp;gt;&lt;br /&gt;
	merging_substack|&lt;br /&gt;
for_each|[$#:$@]}}&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;remembering&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;remembering&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|remembering|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = Eventually followed by | data3 = Either &amp;lt;code&amp;gt;[[#entering_substack|entering_substack]]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[[#flushing|flushing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#entering_substack|entering_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#pulling|pulling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#merging_substack|merging_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#detaching_substack|detaching_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#leaving_substack|leaving_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#flushing|flushing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Push a copy of the original (unmodified) parameter list to the queue of snapshots&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|remembering|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
This modifier is somewhat similar to &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt;, except that it retrieves the parameters that were originally passed to the calling template before being affected by the module&#039;s modifiers. The modifier works also after the &amp;lt;code&amp;gt;[[#new|new]]&amp;lt;/code&amp;gt; directive. See &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt; for more information on the stacking mechanism.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;entering_substack&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;entering_substack&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|entering_substack|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = May be immediately followed by | data3 = &amp;lt;code&amp;gt;[[#new|new]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| label4 = Eventually followed by | data4 = Either &amp;lt;code&amp;gt;[[#merging_substack|merging_substack]]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[[#leaving_substack|leaving_substack]]&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;[[#flushing|flushing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header5 = See also&lt;br /&gt;
| data6 = &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#remembering|remembering]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#pulling|pulling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#merging_substack|merging_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#detaching_substack|detaching_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#leaving_substack|leaving_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#flushing|flushing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Enter the first stack in the queue of parameter lists, or copy the current parameters into a substack if the queue is empty&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|entering_substack|[new]|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt; for more information on the stacking mechanism. Once in a substack, it is possible to go back to the parent stack using two different modifiers: &amp;lt;code&amp;gt;[[#merging_substack|merging_substack]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[#leaving_substack|leaving_substack]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;pulling&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;pulling&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|pulling|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 1&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = Often preceeded by | data3 = &amp;lt;code&amp;gt;[[#new|new]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#remembering|remembering]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#merging_substack|merging_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#detaching_substack|detaching_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#leaving_substack|leaving_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#flushing|flushing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Pull a single parameter from the parent stack or from the stack of the original parameters&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|pulling|parameter name|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt; for more information on the stacking mechanism. If this modifer is not used in a substack, the parameter will be pulled from the original (unmodified) parameter list.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;detaching_substack&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;detaching_substack&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|detaching_substack|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = Restrictions | data3 = Usable only inside substacks&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#remembering|remembering]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#entering_substack|entering_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#pulling|pulling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#merging_substack|merging_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#leaving_substack|leaving_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#flushing|flushing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Remove from the parent stack the parameters that are present in the current stack&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|detaching_substack|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
This modifer can only be used in a substack. See &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt; for more information on the stacking mechanism.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;leaving_substack&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;leaving_substack&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|leaving_substack|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = Restrictions | data3 = Usable only inside substacks&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#remembering|remembering]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#entering_substack|entering_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#pulling|pulling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#merging_substack|merging_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#detaching_substack|detaching_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#flushing|flushing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Leave the current substack without merging it, and return to the parent stack&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|leaving_substack|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
This modifer can only be used in a substack. See &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt; for more information on the stacking mechanism.&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;code&amp;gt;[[#flushing|flushing]]&amp;lt;/code&amp;gt; for an example of how to use this modifier.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;merging_substack&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;merging_substack&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|merging_substack|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| label3 = Restrictions | data3 = Usable only inside substacks&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#remembering|remembering]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#entering_substack|entering_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#pulling|pulling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#detaching_substack|detaching_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#leaving_substack|leaving_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#flushing|flushing]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Leave the current stack after merging it with the parent stack, then return to the latter&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|merging_substack|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
This modifer can only be used in a substack. See &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt; for more information on the stacking mechanism.&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;flushing&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;flushing&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|flushing|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = Yes&lt;br /&gt;
| header3 = See also&lt;br /&gt;
| data4 = &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#remembering|remembering]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#entering_substack|entering_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#pulling|pulling]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#merging_substack|merging_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#detaching_substack|detaching_substack]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#leaving_substack|leaving_substack]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Merge the first stack in the queue of snapshotted parameters with the current stack.&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|flushing|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
This modifier is used in conjunction with either &amp;lt;code&amp;gt;[[#leaving_substack|leaving_substack]]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt;. See &amp;lt;code&amp;gt;[[#snapshotting|snapshotting]]&amp;lt;/code&amp;gt; for more information on the stacking mechanism.&lt;br /&gt;
&lt;br /&gt;
In the following wrapper of an &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{example template}}&amp;lt;/syntaxhighlight&amp;gt;, the three parameters {{para|1}}, {{para|2}}, and {{para|3}} are used as aliases for {{para|title}}, {{para|author}}, and {{para|language}} respectively. The &amp;lt;code&amp;gt;flushing&amp;lt;/code&amp;gt; modifier ensures that in case both are present, the named alias will have the precedence over the positional alias. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{#invoke:params|&lt;br /&gt;
entering_substack|&lt;br /&gt;
	discarding|1|&lt;br /&gt;
	discarding|2|&lt;br /&gt;
	discarding|3|&lt;br /&gt;
leaving_substack|&lt;br /&gt;
renaming_by_replacing|1|title|strict|&lt;br /&gt;
renaming_by_replacing|2|author|strict|&lt;br /&gt;
renaming_by_replacing|3|language|strict|&lt;br /&gt;
flushing|&lt;br /&gt;
concat_and_call|example template}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;new&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{Infobox|headerstyle=background:lavender&lt;br /&gt;
| titlestyle = font-weight:normal; font-size:100%;&lt;br /&gt;
| title = Modifier &amp;lt;code&amp;gt;new&amp;lt;/code&amp;gt; &amp;lt;span style=&amp;quot;nowrap&amp;quot;&amp;gt;({{module:params/doc/link to the code|new|code}})&amp;lt;/span&amp;gt;&lt;br /&gt;
| label1 = Num. of arguments | data1 = 0&lt;br /&gt;
| label2 = Repeatable | data2 = No&lt;br /&gt;
| label3 = Restrictions | data3 = First position only&lt;br /&gt;
| header4 = See also&lt;br /&gt;
| data5 = &amp;lt;code&amp;gt;[[#parsing|parsing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#imposing|imposing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#providing|providing]]&amp;lt;/code&amp;gt;&amp;lt;!--, &amp;lt;code&amp;gt;[[#inserting|inserting]]&amp;lt;/code&amp;gt;--&amp;gt;, &amp;lt;code&amp;gt;[[#discarding|discarding]]&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
; Brief&lt;br /&gt;
: &#039;&#039;Get rid of all the incoming parameters and create a new (empty) parameter stack&#039;&#039;&lt;br /&gt;
; Syntax&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|new|pipe function name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modifier does not take arguments besides the name of the function that will follow.&lt;br /&gt;
&lt;br /&gt;
This modifier can only appear in first position, or if substacks are present, immediately after the &amp;lt;code&amp;gt;[[#entering_substack|entering_substack]]&amp;lt;/code&amp;gt; directive. When in first position its main purpose is that of extending the facilities offered by this module (e.g. &amp;lt;code&amp;gt;[[#mapping_by_replacing|mapping_by_replacing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#with_value_matching|with_value_matching]]&amp;lt;/code&amp;gt;, etc.) to custom lists of strings, independently of the incoming parameters. When inside a stack, it signals that the snapshot of the current parameters must be ignored for that stack. The existence of the &amp;lt;code&amp;gt;new&amp;lt;/code&amp;gt; modifier also facilitates debugging the module.&lt;br /&gt;
&lt;br /&gt;
The newly created parameter stack can be populated via &amp;lt;code&amp;gt;[[#parsing|parsing]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[#imposing|imposing]]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[[#providing|providing]]&amp;lt;/code&amp;gt;. The incoming parameters can always be retrieved back using the &amp;lt;code&amp;gt;[[#remembering|remembering]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[#pulling|pulling]]&amp;lt;/code&amp;gt; modifiers.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
* &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{#invoke:params|new|imposing|1|foo|imposing|2|bar|mapping_by_replacing|^.|!%1|list_values}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*: ↳ {{#invoke:params|new|imposing|1|foo|imposing|2|bar|mapping_by_replacing|^.|!%1|list_values}}&lt;br /&gt;
&lt;br /&gt;
{{vpad|1.5em|clear=none}}&lt;br /&gt;
&lt;br /&gt;
== Subpages ==&lt;br /&gt;
* [[Module:Params/ChangeLog]] – Record of the most important changes in the module&#039;s code&lt;br /&gt;
* [[Module:Params/testcases]] – Testing the module&#039;s capabilities&lt;br /&gt;
* [[Module:Params/doc/examples]] – Some of the examples mentioned in this documentation&lt;br /&gt;
&lt;br /&gt;
The complete list of subpages is available [[Special:PrefixIndex/Module:Params/|here]].&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* {{ml|TemplatePar|}}&lt;br /&gt;
* {{ml|ParameterCount|}}&lt;br /&gt;
* {{ml|Separated entries|main}}&lt;br /&gt;
* {{ml|Enumerate|main}}&lt;br /&gt;
* {{ml|Check for unknown parameters|check}}&lt;br /&gt;
* {{ml|Check for deprecated parameters|check}}&lt;br /&gt;
* {{ml|Check for clobbered parameters|check}}&lt;br /&gt;
* {{ml|Parameter validation|}}&lt;br /&gt;
* {{ml|Expand wikitext|main}}&lt;br /&gt;
* {{ml|For loop|main}} and {{tl|For loop}}&lt;br /&gt;
* {{ml|For nowiki|template}} and {{tl|For nowiki}}&lt;br /&gt;
* {{ml|Template wrapper|wrap}}&lt;br /&gt;
* {{ml|ArrayList}}&lt;br /&gt;
* [[Project:TemplateData]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Template metamodules|{{PAGENAME}}]]&lt;br /&gt;
[[Category:Unknown parameters| ]]&lt;br /&gt;
[[Category:Modules that manipulate strings|{{PAGENAME}}]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:Params&amp;diff=6505</id>
		<title>Module:Params</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:Params&amp;diff=6505"/>
		<updated>2025-07-31T19:25:46Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Imported from Wikipedia.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;require[[strict]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	---                                        ---&lt;br /&gt;
	---     LOCAL ENVIRONMENT                  ---&lt;br /&gt;
	---    ________________________________    ---&lt;br /&gt;
	---                                        ---&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	--[[ Abstract utilities ]]--&lt;br /&gt;
	----------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Helper function for `string.gsub()` (for managing zero-padded numbers)&lt;br /&gt;
local function zero_padded (str)&lt;br /&gt;
	return (&#039;%03d%s&#039;):format(#str, str)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Helper function for `table.sort()` (for natural sorting)&lt;br /&gt;
local function natural_sort (var1, var2)&lt;br /&gt;
	return tostring(var1):gsub(&#039;%d+&#039;, zero_padded) &amp;lt;&lt;br /&gt;
		tostring(var2):gsub(&#039;%d+&#039;, zero_padded)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Return a copy or a reference to a table&lt;br /&gt;
local function copy_or_ref_table (src, refonly)&lt;br /&gt;
	if refonly then return src end&lt;br /&gt;
	local newtab = {}&lt;br /&gt;
	for key, val in pairs(src) do newtab[key] = val end&lt;br /&gt;
	return newtab&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Remove some numeric elements from a table, shifting everything to the left&lt;br /&gt;
local function remove_numeric_keys (tbl, idx, len)&lt;br /&gt;
	local cache = {}&lt;br /&gt;
	local tmp = idx + len - 1&lt;br /&gt;
	for key, val in pairs(tbl) do&lt;br /&gt;
		if type(key) == &#039;number&#039; and key &amp;gt;= idx then&lt;br /&gt;
			if key &amp;gt; tmp then cache[key - len] = val end&lt;br /&gt;
			tbl[key] = nil&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for key, val in pairs(cache) do tbl[key] = val end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Make a reduced copy of a table (shifting in both directions if necessary)&lt;br /&gt;
local function copy_table_reduced (tbl, idx, len)&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local tmp = idx + len - 1&lt;br /&gt;
	if idx &amp;gt; 0 then&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			if type(key) ~= &#039;number&#039; or key &amp;lt; idx then&lt;br /&gt;
				ret[key] = val&lt;br /&gt;
			elseif key &amp;gt; tmp then ret[key - len] = val end&lt;br /&gt;
		end&lt;br /&gt;
	elseif tmp &amp;gt; 0 then&lt;br /&gt;
		local nshift = 1 - idx&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			if type(key) ~= &#039;number&#039; then ret[key] = val&lt;br /&gt;
			elseif key &amp;gt; tmp then ret[key - tmp] = val&lt;br /&gt;
			elseif key &amp;lt; idx then ret[key + nshift] = val end&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			if type(key) ~= &#039;number&#039; or key &amp;gt; tmp then&lt;br /&gt;
				ret[key] = val&lt;br /&gt;
			elseif key &amp;lt; idx then ret[key + len] = val end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Make an expanded copy of a table (shifting in both directions if necessary)&lt;br /&gt;
--[[&lt;br /&gt;
local function copy_table_expanded (tbl, idx, len)&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local tmp = idx + len - 1&lt;br /&gt;
	if idx &amp;gt; 0 then&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			if type(key) ~= &#039;number&#039; or key &amp;lt; idx then&lt;br /&gt;
				ret[key] = val&lt;br /&gt;
			else ret[key + len] = val end&lt;br /&gt;
		end&lt;br /&gt;
	elseif tmp &amp;gt; 0 then&lt;br /&gt;
		local nshift = idx - 1&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			if type(key) ~= &#039;number&#039; then ret[key] = val&lt;br /&gt;
			elseif key &amp;gt; 0 then ret[key + tmp] = val&lt;br /&gt;
			elseif key &amp;lt; 1 then ret[key + nshift] = val end&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			if type(key) ~= &#039;number&#039; or key &amp;gt; tmp then&lt;br /&gt;
				ret[key] = val&lt;br /&gt;
			else ret[key - len] = val end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
]]--&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Move a key from a table to another, but only if under a different name and&lt;br /&gt;
-- always parsing numeric strings as numbers&lt;br /&gt;
local function steal_if_renamed (val, src, skey, dest, dkey)&lt;br /&gt;
	local realkey = tonumber(dkey) or dkey:match&#039;^%s*(.-)%s*$&#039;&lt;br /&gt;
	if skey ~= realkey then&lt;br /&gt;
		dest[realkey] = val&lt;br /&gt;
		src[skey] = nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	--[[ Public strings ]]--&lt;br /&gt;
	------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Special match keywords (functions and modifiers MUST avoid these names)&lt;br /&gt;
local mkeywords = {&lt;br /&gt;
	[&#039;or&#039;] = 0,&lt;br /&gt;
	pattern = 1,&lt;br /&gt;
	plain = 2,&lt;br /&gt;
	strict = 3&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Sort functions (functions and modifiers MUST avoid these names)&lt;br /&gt;
local sortfunctions = {&lt;br /&gt;
	--alphabetically = false, -- Simply uncommenting enables the option&lt;br /&gt;
	naturally = natural_sort&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Callback styles for the `mapping_*` and `renaming_*` class of modifiers&lt;br /&gt;
-- (functions and modifiers MUST avoid these names)&lt;br /&gt;
--[[&lt;br /&gt;
&lt;br /&gt;
Meanings of the columns:&lt;br /&gt;
&lt;br /&gt;
  col[1] = Loop type (0-3)&lt;br /&gt;
  col[2] = Number of module arguments that the style requires (1-3)&lt;br /&gt;
  col[3] = Minimum number of sequential parameters passed to the callback&lt;br /&gt;
  col[4] = Name of the callback parameter where to place each parameter name&lt;br /&gt;
  col[5] = Name of the callback parameter where to place each parameter value&lt;br /&gt;
  col[6] = Argument in the modifier&#039;s invocation that will override `col[4]`&lt;br /&gt;
  col[7] = Argument in the modifier&#039;s invocation that will override `col[5]`&lt;br /&gt;
&lt;br /&gt;
A value of `-1` indicates that no meaningful value is stored (i.e. `nil`)&lt;br /&gt;
&lt;br /&gt;
]]--&lt;br /&gt;
local mapping_styles = {&lt;br /&gt;
	names_and_values = { 3, 2, 2, 1, 2, -1, -1 },&lt;br /&gt;
	values_and_names = { 3, 2, 2, 2, 1, -1, -1 },&lt;br /&gt;
	values_only = { 1, 2, 1, -1, 1, -1, -1 },&lt;br /&gt;
	names_only = { 2, 2, 1, 1, -1, -1, -1 },&lt;br /&gt;
	names_and_values_as = { 3, 4, 0, -1, -1, 2, 3 },&lt;br /&gt;
	names_only_as = { 2, 3, 0, -1, -1, 2, -1 },&lt;br /&gt;
	values_only_as = { 1, 3, 0, -1, -1, -1, 2 },&lt;br /&gt;
	blindly = { 0, 2, 0, -1, -1, -1, -1 }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Memory slots (functions and modifiers MUST avoid these names)&lt;br /&gt;
local memoryslots = {&lt;br /&gt;
	i = &#039;itersep&#039;,&lt;br /&gt;
	l = &#039;lastsep&#039;,&lt;br /&gt;
	p = &#039;pairsep&#039;,&lt;br /&gt;
	h = &#039;header&#039;,&lt;br /&gt;
	f = &#039;footer&#039;,&lt;br /&gt;
	n = &#039;ifngiven&#039;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Possible trimming modes for the `parsing` modifier&lt;br /&gt;
local trim_parse_opts = {&lt;br /&gt;
	trim_none = { false, false },&lt;br /&gt;
	trim_positional = { false, true },&lt;br /&gt;
	trim_named = { true, false },&lt;br /&gt;
	trim_all = { true, true }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Possible string modes for the iteration separator in the `parsing` and&lt;br /&gt;
-- `reinterpreting` modifiers&lt;br /&gt;
local isep_parse_opts = {&lt;br /&gt;
	splitter_pattern = false,&lt;br /&gt;
	splitter_string = true&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Possible string modes for the key-value separator in the `parsing` and&lt;br /&gt;
-- `reinterpreting` modifiers&lt;br /&gt;
local psep_parse_opts = {&lt;br /&gt;
	setter_pattern = false,&lt;br /&gt;
	setter_string = true&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Functions and modifiers MUST avoid these names too: `let`&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	--[[ Module&#039;s private environment ]]--&lt;br /&gt;
	--------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Hard-coded name of the module (to avoid going through `frame:getTitle()`)&lt;br /&gt;
local modulename = &#039;Module:Params&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- The functions listed here declare that they don&#039;t need the `frame.args`&lt;br /&gt;
-- metatable to be copied into a regular table; if they are modifiers they also&lt;br /&gt;
-- guarantee that they will make their own (modified) copy available&lt;br /&gt;
local refpipe = {&lt;br /&gt;
	call_for_each_group = true,&lt;br /&gt;
	coins = true,&lt;br /&gt;
	count = true,&lt;br /&gt;
	for_each = true,&lt;br /&gt;
	list = true,&lt;br /&gt;
	list_values = true,&lt;br /&gt;
	value_of = true&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- The functions listed here declare that they don&#039;t need the&lt;br /&gt;
-- `frame:getParent().args` metatable to be copied into a regular table; if &lt;br /&gt;
-- they are modifiers they also guarantee that they will make their own&lt;br /&gt;
-- (modified) copy available&lt;br /&gt;
local refparams = {&lt;br /&gt;
	call_for_each_group = true,&lt;br /&gt;
	combining_by_calling = true,&lt;br /&gt;
	concat_and_call = true,&lt;br /&gt;
	concat_and_invoke = true,&lt;br /&gt;
	concat_and_magic = true,&lt;br /&gt;
	converting_names_to_uppercase = true,&lt;br /&gt;
	converting_names_to_lowercase = true,&lt;br /&gt;
	count = true,&lt;br /&gt;
	--inserting = true,&lt;br /&gt;
	grouping_by_calling = true,&lt;br /&gt;
	mixing_names_and_values = true,&lt;br /&gt;
	renaming_by_mixing = true,&lt;br /&gt;
	--renaming_to_values = true,&lt;br /&gt;
	--swapping_names_and_values = true,&lt;br /&gt;
	value_of = true,&lt;br /&gt;
	with_name_matching = true&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Maximum number of numeric parameters that can be filled, if missing (we&lt;br /&gt;
-- chose an arbitrary number for this constant; you can discuss about its&lt;br /&gt;
-- optimal value at Module talk:Params)&lt;br /&gt;
local maxfill = 1024&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- The private table of functions&lt;br /&gt;
local library = {}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Functions and modifiers that can only be invoked in first position&lt;br /&gt;
local static_iface = {}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Create a new context&lt;br /&gt;
local function context_new (frame)&lt;br /&gt;
	local ctx = {}&lt;br /&gt;
	ctx.frame = frame&lt;br /&gt;
	ctx.oparams = frame.args&lt;br /&gt;
	ctx.firstposonly = static_iface&lt;br /&gt;
	ctx.iterfunc = pairs&lt;br /&gt;
	ctx.sorttype = 0&lt;br /&gt;
	ctx.n_parents = 0&lt;br /&gt;
	ctx.n_children = 0&lt;br /&gt;
	ctx.n_available = maxfill&lt;br /&gt;
	return ctx&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Move to the next action within the user-given list&lt;br /&gt;
local function context_iterate (ctx, n_forward)&lt;br /&gt;
	local nextfn&lt;br /&gt;
	if ctx.pipe[n_forward] ~= nil then&lt;br /&gt;
		nextfn = ctx.pipe[n_forward]:match&#039;^%s*(.*%S)&#039;&lt;br /&gt;
	end&lt;br /&gt;
	if nextfn == nil then error(modulename ..&lt;br /&gt;
		&#039;: You must specify a function to call&#039;, 0) end&lt;br /&gt;
	if library[nextfn] == nil then&lt;br /&gt;
		if ctx.firstposonly[nextfn] == nil then error(modulename ..&lt;br /&gt;
			&#039;: The function ‘&#039; .. nextfn .. &#039;’ does not exist&#039;, 0)&lt;br /&gt;
		else error(modulename .. &#039;: The ‘&#039; .. nextfn ..&lt;br /&gt;
			&#039;’ directive can only appear in first position&#039;, 0)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	remove_numeric_keys(ctx.pipe, 1, n_forward)&lt;br /&gt;
	return library[nextfn]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Main loop&lt;br /&gt;
local function main_loop (ctx, start_with)&lt;br /&gt;
	local fn = start_with&lt;br /&gt;
	repeat fn = fn(ctx) until not fn&lt;br /&gt;
	if ctx.n_parents &amp;gt; 0 then error(modulename ..&lt;br /&gt;
		&#039;: One or more ‘merging_substack’ directives are missing&#039;, 0) end&lt;br /&gt;
	if ctx.n_children &amp;gt; 0 then error(modulename ..&lt;br /&gt;
		&#039;, For some of the snapshots either the ‘flushing’ directive is missing or a group has not been properly closed with ‘merging_substack’&#039;, 0) end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Add a new stack of parameters to `ctx.children`&lt;br /&gt;
local function push_cloned_stack (ctx, tbl)&lt;br /&gt;
	local newparams = {}&lt;br /&gt;
	local currsnap = ctx.n_children + 1&lt;br /&gt;
	if ctx.children == nil then ctx.children = { newparams }&lt;br /&gt;
	else ctx.children[currsnap] = newparams end&lt;br /&gt;
	for key, val in pairs(tbl) do newparams[key] = val end&lt;br /&gt;
	ctx.n_children = currsnap&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Parse optional user arguments of type `...|[let]|[...][number of additional&lt;br /&gt;
-- parameters]|[parameter 1]|[parameter 2]|[...]`&lt;br /&gt;
local function load_child_opts (src, start_from, append_after)&lt;br /&gt;
	local names&lt;br /&gt;
	local tmp&lt;br /&gt;
	local tbl = {}&lt;br /&gt;
	local pin = start_from&lt;br /&gt;
	if src[pin] ~= nil and src[pin]:match&#039;^%s*let%s*$&#039; then&lt;br /&gt;
		names = {}&lt;br /&gt;
		repeat&lt;br /&gt;
			tmp = src[pin + 1] or &#039;&#039;&lt;br /&gt;
			names[tonumber(tmp) or tmp:match&#039;^%s*(.-)%s*$&#039; or &#039;&#039;] =&lt;br /&gt;
				src[pin + 2]&lt;br /&gt;
			pin = pin + 3&lt;br /&gt;
		until src[pin] == nil or not src[pin]:match&#039;^%s*let%s*$&#039;&lt;br /&gt;
	end&lt;br /&gt;
	tmp = tonumber(src[pin])&lt;br /&gt;
	if tmp ~= nil then&lt;br /&gt;
		if tmp &amp;lt; 0 then tmp = -1 end&lt;br /&gt;
		local shf = append_after - pin&lt;br /&gt;
		for idx = pin + 1, pin + tmp do tbl[idx + shf] = src[idx] end&lt;br /&gt;
		pin = pin + tmp + 1&lt;br /&gt;
	end&lt;br /&gt;
	if names ~= nil then&lt;br /&gt;
		for key, val in pairs(names) do tbl[key] = val end&lt;br /&gt;
	end&lt;br /&gt;
	return tbl, pin&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Load the optional arguments of some of the `mapping_*` and `renaming_*`&lt;br /&gt;
-- class of modifiers&lt;br /&gt;
local function load_callback_opts (src, n_skip, default_style)&lt;br /&gt;
	local style&lt;br /&gt;
	local shf&lt;br /&gt;
	local tmp = src[n_skip + 1]&lt;br /&gt;
	if tmp ~= nil then style = mapping_styles[tmp:match&#039;^%s*(.-)%s*$&#039;] end&lt;br /&gt;
	if style == nil then&lt;br /&gt;
		style = default_style&lt;br /&gt;
		shf = n_skip - 1&lt;br /&gt;
	else shf = n_skip end&lt;br /&gt;
	local n_exist = style[3]&lt;br /&gt;
	local karg = style[4]&lt;br /&gt;
	local varg = style[5]&lt;br /&gt;
	tmp = style[6]&lt;br /&gt;
	if tmp &amp;gt; -1 then&lt;br /&gt;
		tmp = src[tmp + shf]&lt;br /&gt;
		karg = tonumber(tmp)&lt;br /&gt;
		if karg == nil then karg = tmp:match&#039;^%s*(.-)%s*$&#039;&lt;br /&gt;
		else n_exist = math.max(n_exist, karg) end&lt;br /&gt;
	end&lt;br /&gt;
	tmp = style[7]&lt;br /&gt;
	if tmp &amp;gt; -1 then&lt;br /&gt;
		tmp = src[tmp + shf]&lt;br /&gt;
		varg = tonumber(tmp)&lt;br /&gt;
		if varg == nil then varg = tmp:match&#039;^%s*(.-)%s*$&#039;&lt;br /&gt;
		else n_exist = math.max(n_exist, varg) end&lt;br /&gt;
	end&lt;br /&gt;
	local dest, nargs = load_child_opts(src, style[2] + shf, n_exist)&lt;br /&gt;
	tmp = style[1]&lt;br /&gt;
	if (tmp == 3 or tmp == 2) and dest[karg] ~= nil then&lt;br /&gt;
		tmp = tmp - 2 end&lt;br /&gt;
	if (tmp == 3 or tmp == 1) and dest[varg] ~= nil then&lt;br /&gt;
		tmp = tmp - 1 end&lt;br /&gt;
	return dest, nargs, tmp, karg, varg&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Parse the arguments of some of the `mapping_*` and `renaming_*` class of&lt;br /&gt;
-- modifiers&lt;br /&gt;
local function load_replace_args (opts, fname)&lt;br /&gt;
	if opts[1] == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘&#039; .. fname .. &#039;’: No pattern string was given&#039;, 0) end&lt;br /&gt;
	if opts[2] == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘&#039; .. fname .. &#039;’: No replacement string was given&#039;, 0) end&lt;br /&gt;
	local ptn = opts[1]&lt;br /&gt;
	local repl = opts[2]&lt;br /&gt;
	local argc = 3&lt;br /&gt;
	local nmax = tonumber(opts[3])&lt;br /&gt;
	if nmax ~= nil or (opts[3] or &#039;&#039;):match&#039;^%s*$&#039; ~= nil then argc = 4 end&lt;br /&gt;
	local flg = opts[argc]&lt;br /&gt;
	if flg ~= nil then flg = mkeywords[flg:match&#039;^%s*(.-)%s*$&#039;] end&lt;br /&gt;
	if flg == 0 then flg = nil elseif flg ~= nil then argc = argc + 1 end&lt;br /&gt;
	return ptn, repl, nmax, flg, argc, (nmax ~= nil and nmax &amp;lt; 1) or&lt;br /&gt;
		(flg == 3 and ptn == repl)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Parse the arguments of the `with_*_matching` class of modifiers&lt;br /&gt;
local function load_pattern_args (opts, fname)&lt;br /&gt;
	local state = 0&lt;br /&gt;
	local cnt = 1&lt;br /&gt;
	local keyw&lt;br /&gt;
	local nptns = 0&lt;br /&gt;
	local ptns = {}&lt;br /&gt;
	for _, val in ipairs(opts) do&lt;br /&gt;
		if state == 0 then&lt;br /&gt;
			nptns = nptns + 1&lt;br /&gt;
			ptns[nptns] = { val, false, false }&lt;br /&gt;
			state = -1&lt;br /&gt;
		else&lt;br /&gt;
			keyw = val:match&#039;^%s*(.*%S)&#039;&lt;br /&gt;
			if keyw == nil or mkeywords[keyw] == nil or (&lt;br /&gt;
				state &amp;gt; 0 and mkeywords[keyw] &amp;gt; 0&lt;br /&gt;
			) then break&lt;br /&gt;
			else&lt;br /&gt;
				state = mkeywords[keyw]&lt;br /&gt;
				if state &amp;gt; 1 then ptns[nptns][2] = true end&lt;br /&gt;
				if state == 3 then ptns[nptns][3] = true end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		cnt = cnt + 1&lt;br /&gt;
	end&lt;br /&gt;
	if state == 0 then error(modulename .. &#039;, ‘&#039; .. fname ..&lt;br /&gt;
		&#039;’: No pattern was given&#039;, 0) end&lt;br /&gt;
	return ptns, nptns, cnt&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Load the optional arguments of the `parsing` and `reinterpreting` modifiers&lt;br /&gt;
local function load_parse_opts (opts, start_from)&lt;br /&gt;
	local argc = start_from&lt;br /&gt;
	local tmp&lt;br /&gt;
	local optslots = { true, true, true }&lt;br /&gt;
	local noptslots = 3&lt;br /&gt;
	local trimn = true&lt;br /&gt;
	local trimu = false&lt;br /&gt;
	local iplain = true&lt;br /&gt;
	local pplain = true&lt;br /&gt;
	local isp = &#039;|&#039;&lt;br /&gt;
	local psp = &#039;=&#039;&lt;br /&gt;
	repeat&lt;br /&gt;
		noptslots = noptslots - 1&lt;br /&gt;
		tmp = opts[argc]&lt;br /&gt;
		if tmp == nil then break end&lt;br /&gt;
		tmp = tmp:match&#039;^%s*(.-)%s*$&#039;&lt;br /&gt;
		if optslots[1] ~= nil and trim_parse_opts[tmp] ~= nil then&lt;br /&gt;
			tmp = trim_parse_opts[tmp]&lt;br /&gt;
			trimn = tmp[1]&lt;br /&gt;
			trimu = tmp[2]&lt;br /&gt;
			optslots[1] = nil&lt;br /&gt;
		elseif optslots[2] ~= nil and isep_parse_opts[tmp] ~= nil then&lt;br /&gt;
			argc = argc + 1&lt;br /&gt;
			iplain = isep_parse_opts[tmp]&lt;br /&gt;
			isp = opts[argc]&lt;br /&gt;
			optslots[2] = nil&lt;br /&gt;
		elseif optslots[3] ~= nil and psep_parse_opts[tmp] ~= nil then&lt;br /&gt;
			argc = argc + 1&lt;br /&gt;
			pplain = psep_parse_opts[tmp]&lt;br /&gt;
			psp = opts[argc]&lt;br /&gt;
			optslots[3] = nil&lt;br /&gt;
		else break end&lt;br /&gt;
		argc = argc + 1&lt;br /&gt;
	until noptslots &amp;lt; 1&lt;br /&gt;
	return isp, iplain, psp, pplain, trimn, trimu, argc&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Map parameters&#039; values using a custom callback and a referenced table&lt;br /&gt;
local value_maps = {&lt;br /&gt;
	[0] = function (tbl, margs, karg, varg, fn)&lt;br /&gt;
		for key in pairs(tbl) do tbl[key] = fn() end&lt;br /&gt;
	end,&lt;br /&gt;
	[1] = function (tbl, margs, karg, varg, fn)&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			margs[varg] = val&lt;br /&gt;
			tbl[key] = fn()&lt;br /&gt;
		end&lt;br /&gt;
	end,&lt;br /&gt;
	[2] = function (tbl, margs, karg, varg, fn)&lt;br /&gt;
		for key in pairs(tbl) do&lt;br /&gt;
			margs[karg] = key&lt;br /&gt;
			tbl[key] = fn()&lt;br /&gt;
		end&lt;br /&gt;
	end,&lt;br /&gt;
	[3] = function (tbl, margs, karg, varg, fn)&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			margs[karg] = key&lt;br /&gt;
			margs[varg] = val&lt;br /&gt;
			tbl[key] = fn()&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Private table for `map_names()`&lt;br /&gt;
local name_thieves = {&lt;br /&gt;
	[0] = function (cache, tbl, rargs, karg, varg, fn)&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			steal_if_renamed(val, tbl, key, cache, fn())&lt;br /&gt;
		end&lt;br /&gt;
	end,&lt;br /&gt;
	[1] = function (cache, tbl, rargs, karg, varg, fn)&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			rargs[varg] = val&lt;br /&gt;
			steal_if_renamed(val, tbl, key, cache, fn())&lt;br /&gt;
		end&lt;br /&gt;
	end,&lt;br /&gt;
	[2] = function (cache, tbl, rargs, karg, varg, fn)&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			rargs[karg] = key&lt;br /&gt;
			steal_if_renamed(val, tbl, key, cache, fn())&lt;br /&gt;
		end&lt;br /&gt;
	end,&lt;br /&gt;
	[3] = function (cache, tbl, rargs, karg, varg, fn)&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			rargs[karg] = key&lt;br /&gt;
			rargs[varg] = val&lt;br /&gt;
			steal_if_renamed(val, tbl, key, cache, fn())&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Map parameters&#039; names using a custom callback and a referenced table&lt;br /&gt;
local function map_names (tbl, rargs, karg, varg, looptype, fn)&lt;br /&gt;
	local cache = {}&lt;br /&gt;
	name_thieves[looptype](cache, tbl, rargs, karg, varg, fn)&lt;br /&gt;
	for key, val in pairs(cache) do tbl[key] = val end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Return a new table that contains `src` regrouped according to the numeric&lt;br /&gt;
-- suffixes in its keys&lt;br /&gt;
local function make_groups (src)&lt;br /&gt;
	-- NOTE: `src` might be the original metatable!&lt;br /&gt;
	local tmp&lt;br /&gt;
	local prefix&lt;br /&gt;
	local gid&lt;br /&gt;
	local groups = {}&lt;br /&gt;
	for key, val in pairs(src) do&lt;br /&gt;
		-- `key` must only be a string or a number...&lt;br /&gt;
		gid = tonumber(key)&lt;br /&gt;
		if gid == nil then&lt;br /&gt;
			prefix, gid = key:match&#039;^%s*(.-)%s*(%-?%d*)%s*$&#039;&lt;br /&gt;
			gid = tonumber(gid) or &#039;&#039;&lt;br /&gt;
		else prefix = &#039;&#039; end&lt;br /&gt;
		if groups[gid] == nil then groups[gid] = {} end&lt;br /&gt;
		tmp = tonumber(prefix)&lt;br /&gt;
		if tmp ~= nil then&lt;br /&gt;
			if tmp &amp;lt; 1 then prefix = tmp - 1 else prefix = tmp end&lt;br /&gt;
		end&lt;br /&gt;
		groups[gid][prefix] = val&lt;br /&gt;
	end&lt;br /&gt;
	return groups&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Split into parts a string containing the `$#` and `$@` placeholders and&lt;br /&gt;
-- return the information as a skeleton table, a canvas table and a length&lt;br /&gt;
local function parse_placeholder_string (target)&lt;br /&gt;
	local skel = {}&lt;br /&gt;
	local canvas = {}&lt;br /&gt;
	local idx = 1&lt;br /&gt;
	local s_pos = 1&lt;br /&gt;
	local e_pos = string.find(target, &#039;%$[@#]&#039;, 1, false)&lt;br /&gt;
	while e_pos ~= nil do&lt;br /&gt;
		canvas[idx] = target:sub(s_pos, e_pos - 1)&lt;br /&gt;
		skel[idx + 1] = target:sub(e_pos, e_pos + 1) == &#039;$@&#039;&lt;br /&gt;
		idx = idx + 2&lt;br /&gt;
		s_pos = e_pos + 2&lt;br /&gt;
		e_pos = string.find(target, &#039;%$[@#]&#039;, s_pos, false)&lt;br /&gt;
	end&lt;br /&gt;
	if (s_pos &amp;gt; target:len()) then idx = idx - 1&lt;br /&gt;
	else canvas[idx] = target:sub(s_pos) end&lt;br /&gt;
	return skel, canvas, idx&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Populate a table by parsing a parameter string&lt;br /&gt;
local function parse_parameter_string (tbl, str, isp, ipl, psp, ppl, trn, tru)&lt;br /&gt;
	local key&lt;br /&gt;
	local val&lt;br /&gt;
	local spos1&lt;br /&gt;
	local spos2&lt;br /&gt;
	local pos1&lt;br /&gt;
	local pos2&lt;br /&gt;
	local pos3 = 0&lt;br /&gt;
	local idx = 1&lt;br /&gt;
	local lenplone = #str + 1&lt;br /&gt;
	if isp == nil or isp == &#039;&#039; then&lt;br /&gt;
		if psp == nil or psp == &#039;&#039; then&lt;br /&gt;
			if tru then tbl[idx] = str:match&#039;^%s*(.-)%s*$&#039;&lt;br /&gt;
			else tbl[idx] = str end&lt;br /&gt;
			return tbl&lt;br /&gt;
		end&lt;br /&gt;
		spos1, spos2 = str:find(psp, 1, ppl)&lt;br /&gt;
		if spos1 == nil then&lt;br /&gt;
			key = idx&lt;br /&gt;
			if tru then val = str:match&#039;^%s*(.-)%s*$&#039;&lt;br /&gt;
			else val = str end&lt;br /&gt;
			idx = idx + 1&lt;br /&gt;
		else&lt;br /&gt;
			key = str:sub(1, spos1 - 1)&lt;br /&gt;
			key = tonumber(key) or key:match&#039;^%s*(.-)%s*$&#039;&lt;br /&gt;
			val = str:sub(spos2 + 1)&lt;br /&gt;
			if trn then val = val:match&#039;^%s*(.-)%s*$&#039; end&lt;br /&gt;
		end&lt;br /&gt;
		tbl[key] = val&lt;br /&gt;
		return tbl&lt;br /&gt;
	end&lt;br /&gt;
	if psp == nil or psp == &#039;&#039; then&lt;br /&gt;
		repeat&lt;br /&gt;
			pos1 = pos3 + 1&lt;br /&gt;
			pos2, pos3 = str:find(isp, pos1, ipl)&lt;br /&gt;
			val = str:sub(pos1, (pos2 or lenplone) - 1)&lt;br /&gt;
			if tru then val = val:match&#039;^%s*(.-)%s*$&#039; end&lt;br /&gt;
			tbl[idx] = val&lt;br /&gt;
			idx = idx + 1&lt;br /&gt;
		until pos2 == nil&lt;br /&gt;
		return tbl&lt;br /&gt;
	end&lt;br /&gt;
	repeat&lt;br /&gt;
		pos1 = pos3 + 1&lt;br /&gt;
		pos2, pos3 = str:find(isp, pos1, ipl)&lt;br /&gt;
		val = str:sub(pos1, (pos2 or lenplone) - 1)&lt;br /&gt;
		spos1, spos2 = val:find(psp, 1, ppl)&lt;br /&gt;
		if spos1 == nil then&lt;br /&gt;
			key = idx&lt;br /&gt;
			if tru then val = val:match&#039;^%s*(.-)%s*$&#039; end&lt;br /&gt;
			idx = idx + 1&lt;br /&gt;
		else&lt;br /&gt;
			key = val:sub(1, spos1 - 1)&lt;br /&gt;
			key = tonumber(key) or key:match&#039;^%s*(.-)%s*$&#039;&lt;br /&gt;
			val = val:sub(spos2 + 1)&lt;br /&gt;
			if trn then val = val:match&#039;^%s*(.-)%s*$&#039; end&lt;br /&gt;
		end&lt;br /&gt;
		tbl[key] = val&lt;br /&gt;
	until pos2 == nil&lt;br /&gt;
	return tbl&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Concatenate the numeric keys from the table of parameters to the numeric&lt;br /&gt;
-- keys from the table of options; non-numeric keys from the table of options&lt;br /&gt;
-- will prevail over colliding non-numeric keys from the table of parameters&lt;br /&gt;
local function concat_params (ctx)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	local nmax = table.maxn(ctx.pipe)&lt;br /&gt;
	local retval = {}&lt;br /&gt;
	if ctx.subset == 1 then&lt;br /&gt;
		-- We need only the sequence&lt;br /&gt;
		for key, val in ipairs(tbl) do retval[key + nmax] = val end&lt;br /&gt;
	else&lt;br /&gt;
		if ctx.subset == -1 then&lt;br /&gt;
			for key in ipairs(tbl) do tbl[key] = nil end&lt;br /&gt;
		end&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			if type(key) == &#039;number&#039; and key &amp;gt; 0 then&lt;br /&gt;
				retval[key + nmax] = val&lt;br /&gt;
			else retval[key] = val end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for key, val in pairs(ctx.pipe) do retval[key] = val end&lt;br /&gt;
	return retval&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Flush the parameters by calling a custom function for each value (after this&lt;br /&gt;
-- function has been invoked `ctx.params` will be no longer usable)&lt;br /&gt;
local function flush_params (ctx, fn)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	if ctx.subset == 1 then&lt;br /&gt;
		for key, val in ipairs(tbl) do fn(key, val) end&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	if ctx.subset == -1 then&lt;br /&gt;
		for key, val in ipairs(tbl) do tbl[key] = nil end&lt;br /&gt;
	end&lt;br /&gt;
	if ctx.sorttype &amp;gt; 0 then&lt;br /&gt;
		local nums = {}&lt;br /&gt;
		local words = {}&lt;br /&gt;
		local nn = 0&lt;br /&gt;
		local nw = 0&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			if type(key) == &#039;number&#039; then&lt;br /&gt;
				nn = nn + 1&lt;br /&gt;
				nums[nn] = key&lt;br /&gt;
			else&lt;br /&gt;
				nw = nw + 1&lt;br /&gt;
				words[nw] = key&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		table.sort(nums)&lt;br /&gt;
		table.sort(words, natural_sort)&lt;br /&gt;
		if ctx.sorttype == 2 then&lt;br /&gt;
			for idx = 1, nw do fn(words[idx], tbl[words[idx]]) end&lt;br /&gt;
			for idx = 1, nn do fn(nums[idx], tbl[nums[idx]]) end&lt;br /&gt;
			return&lt;br /&gt;
		end&lt;br /&gt;
		for idx = 1, nn do fn(nums[idx], tbl[nums[idx]]) end&lt;br /&gt;
		for idx = 1, nw do fn(words[idx], tbl[words[idx]]) end&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	if ctx.subset ~= -1 then&lt;br /&gt;
		for key, val in ipairs(tbl) do&lt;br /&gt;
			fn(key, val)&lt;br /&gt;
			tbl[key] = nil&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for key, val in pairs(tbl) do fn(key, val) end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	--[[ Modifiers ]]--&lt;br /&gt;
	-----------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|sequential|pipe to&lt;br /&gt;
library.sequential = function (ctx)&lt;br /&gt;
	if ctx.subset == -1 then error(modulename ..&lt;br /&gt;
		&#039;: The two directives ‘non-sequential’ and ‘sequential’ are in contradiction with each other&#039;, 0) end&lt;br /&gt;
	if ctx.sorttype &amp;gt; 0 then error(modulename ..&lt;br /&gt;
		&#039;: The ‘all_sorted’ and ‘reassorted’ directives are redundant when followed by ‘sequential’&#039;, 0) end&lt;br /&gt;
	ctx.iterfunc = ipairs&lt;br /&gt;
	ctx.subset = 1&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|non-sequential|pipe to&lt;br /&gt;
library[&#039;non-sequential&#039;] = function (ctx)&lt;br /&gt;
	if ctx.subset == 1 then error(modulename ..&lt;br /&gt;
		&#039;: The two directives ‘sequential’ and ‘non-sequential’ are in contradiction with each other&#039;, 0) end&lt;br /&gt;
	ctx.iterfunc = pairs&lt;br /&gt;
	ctx.subset = -1&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|all_sorted|pipe to&lt;br /&gt;
library.all_sorted = function (ctx)&lt;br /&gt;
	if ctx.subset == 1 then error(modulename ..&lt;br /&gt;
		&#039;: The ‘all_sorted’ directive is redundant after ‘sequential’&#039;, 0) end&lt;br /&gt;
	if ctx.sorttype == 2 then error(modulename ..&lt;br /&gt;
		&#039;: The two directives ‘reassorted’ and ‘sequential’ are in contradiction with each other&#039;, 0) end&lt;br /&gt;
	ctx.sorttype = 1&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|reassorted|pipe to&lt;br /&gt;
library.reassorted = function (ctx)&lt;br /&gt;
	if ctx.subset == 1 then error(modulename ..&lt;br /&gt;
		&#039;: The ‘reassorted’ directive is redundant after ‘sequential’&#039;, 0) end&lt;br /&gt;
	if ctx.sorttype == 1 then error(modulename ..&lt;br /&gt;
		&#039;: The two directives ‘sequential’ and ‘reassorted’ are in contradiction with each other&#039;, 0) end&lt;br /&gt;
	ctx.sorttype = 2&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|setting|directives|...|pipe to&lt;br /&gt;
library.setting = function (ctx)&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local cmd = opts[1]&lt;br /&gt;
	if cmd ~= nil then&lt;br /&gt;
		cmd = cmd:gsub(&#039;%s+&#039;, &#039;&#039;):gsub(&#039;/+&#039;, &#039;/&#039;):match&#039;^/*(.*[^/])&#039;&lt;br /&gt;
	end&lt;br /&gt;
	if cmd == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘setting’: No directive was given&#039;, 0) end&lt;br /&gt;
	local sep = string.byte(&#039;/&#039;)&lt;br /&gt;
	local argc = 2&lt;br /&gt;
	local dest = {}&lt;br /&gt;
	local vname&lt;br /&gt;
	local chr&lt;br /&gt;
	for idx = 1, #cmd do&lt;br /&gt;
		chr = cmd:byte(idx)&lt;br /&gt;
		if chr == sep then&lt;br /&gt;
			for key, val in ipairs(dest) do&lt;br /&gt;
				ctx[val] = opts[argc]&lt;br /&gt;
				dest[key] = nil&lt;br /&gt;
			end&lt;br /&gt;
			argc = argc + 1&lt;br /&gt;
		else&lt;br /&gt;
			vname = memoryslots[string.char(chr)]&lt;br /&gt;
			if vname == nil then error(modulename ..&lt;br /&gt;
				&#039;, ‘setting’: Unknown slot ‘&#039; ..&lt;br /&gt;
				string.char(chr) .. &#039;’&#039;, 0) end&lt;br /&gt;
			table.insert(dest, vname)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for key, val in ipairs(dest) do ctx[val] = opts[argc] end&lt;br /&gt;
	return context_iterate(ctx, argc + 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|squeezing|pipe to&lt;br /&gt;
library.squeezing = function (ctx)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	local store = {}&lt;br /&gt;
	local indices = {}&lt;br /&gt;
	local newlen = 0&lt;br /&gt;
	for key, val in pairs(tbl) do&lt;br /&gt;
		if type(key) == &#039;number&#039; then&lt;br /&gt;
			newlen = newlen + 1&lt;br /&gt;
			indices[newlen] = key&lt;br /&gt;
			store[key] = val&lt;br /&gt;
			tbl[key] = nil&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(indices)&lt;br /&gt;
	for idx = 1, newlen do tbl[idx] = store[indices[idx]] end&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|filling_the_gaps|pipe to&lt;br /&gt;
library.filling_the_gaps = function (ctx)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	local nmin = 1&lt;br /&gt;
	local nmax = nil&lt;br /&gt;
	local nnums = -1&lt;br /&gt;
	local tmp = {}&lt;br /&gt;
	for key, val in pairs(tbl) do&lt;br /&gt;
		if type(key) == &#039;number&#039; then&lt;br /&gt;
			if nmax == nil then&lt;br /&gt;
				if key &amp;lt; nmin then nmin = key end&lt;br /&gt;
				nmax = key&lt;br /&gt;
			elseif key &amp;gt; nmax then nmax = key&lt;br /&gt;
			elseif key &amp;lt; nmin then nmin = key end&lt;br /&gt;
			nnums = nnums + 1&lt;br /&gt;
			tmp[key] = val&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if nmax ~= nil and nmax - nmin &amp;gt; nnums then&lt;br /&gt;
		ctx.n_available = ctx.n_available + nmin + nnums - nmax&lt;br /&gt;
		if ctx.n_available &amp;lt; 0 then error(modulename ..&lt;br /&gt;
			&#039;, ‘filling_the_gaps’: It is possible to fill at most &#039; ..&lt;br /&gt;
			tostring(maxfill) .. &#039; parameters&#039;, 0) end&lt;br /&gt;
		for idx = nmin, nmax, 1 do tbl[idx] = &#039;&#039; end&lt;br /&gt;
		for key, val in pairs(tmp) do tbl[key] = val end&lt;br /&gt;
	end&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|clearing|pipe to&lt;br /&gt;
library.clearing = function (ctx)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	local numerics = {}&lt;br /&gt;
	for key, val in pairs(tbl) do&lt;br /&gt;
		if type(key) == &#039;number&#039; then&lt;br /&gt;
			numerics[key] = val&lt;br /&gt;
			tbl[key] = nil&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for key, val in ipairs(numerics) do tbl[key] = val end&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|cutting|left cut|right cut|pipe to&lt;br /&gt;
library.cutting = function (ctx)&lt;br /&gt;
	local lcut = tonumber(ctx.pipe[1])&lt;br /&gt;
	if lcut == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘cutting’: Left cut must be a number&#039;, 0) end&lt;br /&gt;
	local rcut = tonumber(ctx.pipe[2])&lt;br /&gt;
	if rcut == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘cutting’: Right cut must be a number&#039;, 0) end&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	local len = #tbl&lt;br /&gt;
	if lcut &amp;lt; 0 then lcut = len + lcut end&lt;br /&gt;
	if rcut &amp;lt; 0 then rcut = len + rcut end&lt;br /&gt;
	local tot = lcut + rcut&lt;br /&gt;
	if tot &amp;gt; 0 then&lt;br /&gt;
		local cache = {}&lt;br /&gt;
		if tot &amp;gt;= len then&lt;br /&gt;
			for key in ipairs(tbl) do tbl[key] = nil end&lt;br /&gt;
			tot = len&lt;br /&gt;
		else&lt;br /&gt;
			for idx = len - rcut + 1, len, 1 do tbl[idx] = nil end&lt;br /&gt;
			for idx = 1, lcut, 1 do tbl[idx] = nil end&lt;br /&gt;
		end&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			if type(key) == &#039;number&#039; and key &amp;gt; 0 then&lt;br /&gt;
				if key &amp;gt; len then cache[key - tot] = val&lt;br /&gt;
				else cache[key - lcut] = val end&lt;br /&gt;
				tbl[key] = nil&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		for key, val in pairs(cache) do tbl[key] = val end&lt;br /&gt;
	end&lt;br /&gt;
	return context_iterate(ctx, 3)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|cropping|left crop|right crop|pipe to&lt;br /&gt;
library.cropping = function (ctx)&lt;br /&gt;
	local lcut = tonumber(ctx.pipe[1])&lt;br /&gt;
	if lcut == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘cropping’: Left crop must be a number&#039;, 0) end&lt;br /&gt;
	local rcut = tonumber(ctx.pipe[2])&lt;br /&gt;
	if rcut == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘cropping’: Right crop must be a number&#039;, 0) end&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	local nmin&lt;br /&gt;
	local nmax&lt;br /&gt;
	for key in pairs(tbl) do&lt;br /&gt;
		if type(key) == &#039;number&#039; then&lt;br /&gt;
			if nmin == nil then&lt;br /&gt;
				nmin = key&lt;br /&gt;
				nmax = key&lt;br /&gt;
			elseif key &amp;gt; nmax then nmax = key&lt;br /&gt;
			elseif key &amp;lt; nmin then nmin = key end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if nmin ~= nil then&lt;br /&gt;
		local len = nmax - nmin + 1&lt;br /&gt;
		if lcut &amp;lt; 0 then lcut = len + lcut end&lt;br /&gt;
		if rcut &amp;lt; 0 then rcut = len + rcut end&lt;br /&gt;
		if lcut + rcut - len &amp;gt; -1 then&lt;br /&gt;
			for key in pairs(tbl) do&lt;br /&gt;
				if type(key) == &#039;number&#039; then tbl[key] = nil end&lt;br /&gt;
			end&lt;br /&gt;
		elseif lcut + rcut &amp;gt; 0 then&lt;br /&gt;
			for idx = nmax - rcut + 1, nmax do tbl[idx] = nil end&lt;br /&gt;
			for idx = nmin, nmin + lcut - 1 do tbl[idx] = nil end&lt;br /&gt;
			local lshift = nmin + lcut - 1&lt;br /&gt;
			if lshift &amp;gt; 0 then&lt;br /&gt;
				for idx = lshift + 1, nmax, 1 do&lt;br /&gt;
					tbl[idx - lshift] = tbl[idx]&lt;br /&gt;
					tbl[idx] = nil&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return context_iterate(ctx, 3)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|purging|start offset|length|pipe to&lt;br /&gt;
library.purging = function (ctx)&lt;br /&gt;
	local idx = tonumber(ctx.pipe[1])&lt;br /&gt;
	if idx == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘purging’: Start offset must be a number&#039;, 0) end&lt;br /&gt;
	local len = tonumber(ctx.pipe[2])&lt;br /&gt;
	if len == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘purging’: Length must be a number&#039;, 0) end&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	if len &amp;lt; 1 then&lt;br /&gt;
		len = len + table.maxn(tbl)&lt;br /&gt;
		if idx &amp;gt; len then return context_iterate(ctx, 3) end&lt;br /&gt;
		len = len - idx + 1&lt;br /&gt;
	end&lt;br /&gt;
	ctx.params = copy_table_reduced(tbl, idx, len)&lt;br /&gt;
	return context_iterate(ctx, 3)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|backpurging|start offset|length|pipe to&lt;br /&gt;
library.backpurging = function (ctx)&lt;br /&gt;
	local last = tonumber(ctx.pipe[1])&lt;br /&gt;
	if last == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘backpurging’: Start offset must be a number&#039;, 0) end&lt;br /&gt;
	local len = tonumber(ctx.pipe[2])&lt;br /&gt;
	if len == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘backpurging’: Length must be a number&#039;, 0) end&lt;br /&gt;
	local idx&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	if len &amp;gt; 0 then&lt;br /&gt;
		idx = last - len + 1&lt;br /&gt;
	else&lt;br /&gt;
		for key in pairs(tbl) do&lt;br /&gt;
			if type(key) == &#039;number&#039; and (idx == nil or&lt;br /&gt;
				key &amp;lt; idx) then idx = key end&lt;br /&gt;
		end&lt;br /&gt;
		if idx == nil then return context_iterate(ctx, 3) end&lt;br /&gt;
		idx = idx - len&lt;br /&gt;
		if last &amp;lt; idx then return context_iterate(ctx, 3) end&lt;br /&gt;
		len = last - idx + 1&lt;br /&gt;
	end&lt;br /&gt;
	ctx.params = copy_table_reduced(ctx.params, idx, len)&lt;br /&gt;
	return context_iterate(ctx, 3)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|reversing_numeric_names|pipe to&lt;br /&gt;
library.reversing_numeric_names = function (ctx)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	local numerics = {}&lt;br /&gt;
	local nmax = 0&lt;br /&gt;
	for key, val in pairs(tbl) do&lt;br /&gt;
		if type(key) == &#039;number&#039; then&lt;br /&gt;
			numerics[key] = val&lt;br /&gt;
			tbl[key] = nil&lt;br /&gt;
			if key &amp;gt; nmax then nmax = key end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for key, val in pairs(numerics) do tbl[nmax - key + 1] = val end&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|pivoting_numeric_names|pipe to&lt;br /&gt;
--[[&lt;br /&gt;
library.pivoting_numeric_names = function (ctx)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	local shift = #tbl + 1&lt;br /&gt;
	if shift &amp;lt; 2 then return library.reversing_numeric_names(ctx) end&lt;br /&gt;
	local numerics = {}&lt;br /&gt;
	for key, val in pairs(tbl) do&lt;br /&gt;
		if type(key) == &#039;number&#039; then&lt;br /&gt;
			numerics[key] = val&lt;br /&gt;
			tbl[key] = nil&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for key, val in pairs(numerics) do tbl[shift - key] = val end&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
]]--&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|mirroring_numeric_names|pipe to&lt;br /&gt;
--[[&lt;br /&gt;
library.mirroring_numeric_names = function (ctx)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	local numerics = {}&lt;br /&gt;
	local nmax&lt;br /&gt;
	local nmin&lt;br /&gt;
	for key, val in pairs(tbl) do&lt;br /&gt;
		if type(key) == &#039;number&#039; then&lt;br /&gt;
			numerics[key] = val&lt;br /&gt;
			tbl[key] = nil&lt;br /&gt;
			if nmax == nil then&lt;br /&gt;
				nmax = key&lt;br /&gt;
				nmin = key&lt;br /&gt;
			elseif key &amp;gt; nmax then nmax = key&lt;br /&gt;
			elseif key &amp;lt; nmin then nmin = key end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for key, val in pairs(numerics) do tbl[nmax + nmin - key] = val end&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
]]--&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|swapping_numeric_names|pipe to&lt;br /&gt;
--[[&lt;br /&gt;
library.swapping_numeric_names = function (ctx)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	local cache = {}&lt;br /&gt;
	local nsize = 0&lt;br /&gt;
	local tmp&lt;br /&gt;
	for key in pairs(tbl) do&lt;br /&gt;
		if type(key) == &#039;number&#039; then&lt;br /&gt;
			nsize = nsize + 1&lt;br /&gt;
			cache[nsize] = key&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(cache)&lt;br /&gt;
	for idx = math.floor(nsize / 2), 1, -1 do&lt;br /&gt;
		tmp = tbl[cache[idx] ]&lt;br /&gt;
		tbl[cache[idx] ] = tbl[cache[nsize - idx + 1] ]&lt;br /&gt;
		tbl[cache[nsize - idx + 1] ] = tmp&lt;br /&gt;
	end&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
]]--&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|sorting_sequential_values|[criterion]|pipe to&lt;br /&gt;
library.sorting_sequential_values = function (ctx)&lt;br /&gt;
	local sortfn&lt;br /&gt;
	if ctx.pipe[1] ~= nil then sortfn = sortfunctions[ctx.pipe[1]] end&lt;br /&gt;
	if sortfn then table.sort(ctx.params, sortfn)&lt;br /&gt;
	else table.sort(ctx.params) end -- i.e. either `false` or `nil`&lt;br /&gt;
	if sortfn == nil then return context_iterate(ctx, 1) end&lt;br /&gt;
	return context_iterate(ctx, 2)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|inserting|position|how many|...|pipe to&lt;br /&gt;
--[[&lt;br /&gt;
library.inserting = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.params` might be the original metatable! As a modifier,&lt;br /&gt;
	-- this function MUST create a copy of it before returning&lt;br /&gt;
	local idx = tonumber(ctx.pipe[1])&lt;br /&gt;
	if idx == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘inserting’: Position must be a number&#039;, 0) end&lt;br /&gt;
	local len = tonumber(ctx.pipe[2])&lt;br /&gt;
	if len == nil or len &amp;lt; 1 then error(modulename ..&lt;br /&gt;
		&#039;, ‘inserting’: The amount must be a number greater than zero&#039;, 0) end&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local tbl = copy_table_expanded(ctx.params, idx, len)&lt;br /&gt;
	for key = idx, idx + len - 1 do tbl[key] = opts[key - idx + 3] end&lt;br /&gt;
	ctx.params = tbl&lt;br /&gt;
	return context_iterate(ctx, len + 3)&lt;br /&gt;
end&lt;br /&gt;
]]--&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|imposing|name|value|pipe to&lt;br /&gt;
library.imposing = function (ctx)&lt;br /&gt;
	if ctx.pipe[1] == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘imposing’: Missing parameter name to impose&#039;, 0) end&lt;br /&gt;
	local key = ctx.pipe[1]:match&#039;^%s*(.-)%s*$&#039;&lt;br /&gt;
	ctx.params[tonumber(key) or key] = ctx.pipe[2]&lt;br /&gt;
	return context_iterate(ctx, 3)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|providing|name|value|pipe to&lt;br /&gt;
library.providing = function (ctx)&lt;br /&gt;
	if ctx.pipe[1] == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘providing’: Missing parameter name to provide&#039;, 0) end&lt;br /&gt;
	local key = ctx.pipe[1]:match&#039;^%s*(.-)%s*$&#039;&lt;br /&gt;
	key = tonumber(key) or key&lt;br /&gt;
	if ctx.params[key] == nil then ctx.params[key] = ctx.pipe[2] end&lt;br /&gt;
	return context_iterate(ctx, 3)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|discarding|name|[how many]|pipe to&lt;br /&gt;
library.discarding = function (ctx)&lt;br /&gt;
	if ctx.pipe[1] == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘discarding’: Missing parameter name to discard&#039;, 0) end&lt;br /&gt;
	local key = ctx.pipe[1]&lt;br /&gt;
	local len = tonumber(ctx.pipe[2])&lt;br /&gt;
	if len == nil then&lt;br /&gt;
		ctx.params[tonumber(key) or key:match&#039;^%s*(.-)%s*$&#039;] = nil&lt;br /&gt;
		return context_iterate(ctx, 2)&lt;br /&gt;
	end&lt;br /&gt;
	key = tonumber(key)&lt;br /&gt;
	if key == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘discarding’: A range was provided, but the initial parameter name is not numeric&#039;, 0) end&lt;br /&gt;
	if len &amp;lt; 1 then error(modulename ..&lt;br /&gt;
		&#039;, ‘discarding’: A range can only be a number greater than zero&#039;, 0) end&lt;br /&gt;
	for idx = key, key + len - 1 do ctx.params[idx] = nil end&lt;br /&gt;
	return context_iterate(ctx, 3)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|excluding_non-numeric_names|pipe to&lt;br /&gt;
library[&#039;excluding_non-numeric_names&#039;] = function (ctx)&lt;br /&gt;
	local tmp = ctx.params&lt;br /&gt;
	for key, val in pairs(tmp) do&lt;br /&gt;
		if type(key) ~= &#039;number&#039; then tmp[key] = nil end&lt;br /&gt;
	end&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|excluding_numeric_names|pipe to&lt;br /&gt;
library.excluding_numeric_names = function (ctx)&lt;br /&gt;
	local tmp = ctx.params&lt;br /&gt;
	for key, val in pairs(tmp) do&lt;br /&gt;
		if type(key) == &#039;number&#039; then tmp[key] = nil end&lt;br /&gt;
	end&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|with_name_matching|target 1|[plain flag 1]|[or]&lt;br /&gt;
--            |[target 2]|[plain flag 2]|[or]|[...]|[target N]|[plain flag&lt;br /&gt;
--            N]|pipe to&lt;br /&gt;
library.with_name_matching = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.params` might be the original metatable! As a modifier,&lt;br /&gt;
	-- this function MUST create a copy of it before returning&lt;br /&gt;
	local targets, nptns, argc = load_pattern_args(ctx.pipe,&lt;br /&gt;
		&#039;with_name_matching&#039;)&lt;br /&gt;
	local tmp&lt;br /&gt;
	local ptn&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	local newparams = {}&lt;br /&gt;
	for idx = 1, nptns do&lt;br /&gt;
		ptn = targets[idx]&lt;br /&gt;
		if ptn[3] then&lt;br /&gt;
			tmp = tonumber(ptn[1]) or ptn[1]&lt;br /&gt;
			newparams[tmp] = tbl[tmp]&lt;br /&gt;
		else&lt;br /&gt;
			for key, val in pairs(tbl) do&lt;br /&gt;
				if tostring(key):find(ptn[1], 1, ptn[2]) then&lt;br /&gt;
					newparams[key] = val&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	ctx.params = newparams&lt;br /&gt;
	return context_iterate(ctx, argc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|with_name_not_matching|target 1|[plain flag 1]&lt;br /&gt;
--            |[and]|[target 2]|[plain flag 2]|[and]|[...]|[target N]|[plain&lt;br /&gt;
--            flag N]|pipe to&lt;br /&gt;
library.with_name_not_matching = function (ctx)&lt;br /&gt;
	local targets, nptns, argc = load_pattern_args(ctx.pipe,&lt;br /&gt;
		&#039;with_name_not_matching&#039;)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	if nptns == 1 and targets[1][3] then&lt;br /&gt;
		local tmp = targets[1][1]&lt;br /&gt;
		tbl[tonumber(tmp) or tmp] = nil&lt;br /&gt;
		return context_iterate(ctx, argc)&lt;br /&gt;
	end&lt;br /&gt;
	local yesmatch&lt;br /&gt;
	local ptn&lt;br /&gt;
	for key in pairs(tbl) do&lt;br /&gt;
		yesmatch = true&lt;br /&gt;
		for idx = 1, nptns do&lt;br /&gt;
			ptn = targets[idx]&lt;br /&gt;
			if ptn[3] then&lt;br /&gt;
				if tostring(key) ~= ptn[1] then&lt;br /&gt;
					yesmatch = false&lt;br /&gt;
					break&lt;br /&gt;
				end&lt;br /&gt;
			elseif not tostring(key):find(ptn[1], 1, ptn[2]) then&lt;br /&gt;
				yesmatch = false&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if yesmatch then tbl[key] = nil end&lt;br /&gt;
	end&lt;br /&gt;
	return context_iterate(ctx, argc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|with_value_matching|target 1|[plain flag 1]|[or]&lt;br /&gt;
--            |[target 2]|[plain flag 2]|[or]|[...]|[target N]|[plain flag&lt;br /&gt;
--            N]|pipe to&lt;br /&gt;
library.with_value_matching = function (ctx)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	local targets, nptns, argc = load_pattern_args(ctx.pipe,&lt;br /&gt;
		&#039;with_value_matching&#039;)&lt;br /&gt;
	local nomatch&lt;br /&gt;
	local ptn&lt;br /&gt;
	for key, val in pairs(tbl) do&lt;br /&gt;
		nomatch = true&lt;br /&gt;
		for idx = 1, nptns do&lt;br /&gt;
			ptn = targets[idx]&lt;br /&gt;
			if ptn[3] then&lt;br /&gt;
				if val == ptn[1] then&lt;br /&gt;
					nomatch = false&lt;br /&gt;
					break&lt;br /&gt;
				end&lt;br /&gt;
			elseif val:find(ptn[1], 1, ptn[2]) then&lt;br /&gt;
				nomatch = false&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if nomatch then tbl[key] = nil end&lt;br /&gt;
	end&lt;br /&gt;
	return context_iterate(ctx, argc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|with_value_not_matching|target 1|[plain flag 1]&lt;br /&gt;
--            |[and]|[target 2]|[plain flag 2]|[and]|[...]|[target N]|[plain&lt;br /&gt;
--            flag N]|pipe to&lt;br /&gt;
library.with_value_not_matching = function (ctx)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	local targets, nptns, argc = load_pattern_args(ctx.pipe,&lt;br /&gt;
		&#039;with_value_not_matching&#039;)&lt;br /&gt;
	local yesmatch&lt;br /&gt;
	local ptn&lt;br /&gt;
	for key, val in pairs(tbl) do&lt;br /&gt;
		yesmatch = true&lt;br /&gt;
		for idx = 1, nptns do&lt;br /&gt;
			ptn = targets[idx]&lt;br /&gt;
			if ptn[3] then&lt;br /&gt;
				if val ~= ptn[1] then&lt;br /&gt;
					yesmatch = false&lt;br /&gt;
					break&lt;br /&gt;
				end&lt;br /&gt;
			elseif not val:find(ptn[1], 1, ptn[2]) then&lt;br /&gt;
				yesmatch = false&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if yesmatch then tbl[key] = nil end&lt;br /&gt;
	end&lt;br /&gt;
	return context_iterate(ctx, argc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|trimming_values|pipe to&lt;br /&gt;
library.trimming_values = function (ctx)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	for key, val in pairs(tbl) do tbl[key] = val:match&#039;^%s*(.-)%s*$&#039; end&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|converting_values_to_lowercase|pipe to&lt;br /&gt;
library.converting_values_to_lowercase = function (ctx)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	for key, val in pairs(tbl) do tbl[key] = val:lower() end&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|converting_values_to_uppercase|pipe to&lt;br /&gt;
library.converting_values_to_uppercase = function (ctx)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	for key, val in pairs(tbl) do tbl[key] = val:upper() end&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|mapping_by_calling|template name|[call&lt;br /&gt;
--            style]|[let]|[...][number of additional parameters]|[parameter&lt;br /&gt;
--            1]|[parameter 2]|[...]|[parameter N]|pipe to&lt;br /&gt;
library.mapping_by_calling = function (ctx)&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local tname&lt;br /&gt;
	if opts[1] ~= nil then tname = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if tname == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘mapping_by_calling’: No template name was provided&#039;, 0) end&lt;br /&gt;
	local margs, argc, looptype, karg, varg = load_callback_opts(opts, 1,&lt;br /&gt;
		mapping_styles.values_only)&lt;br /&gt;
	local model = { title = tname, args = margs }&lt;br /&gt;
	value_maps[looptype](ctx.params, margs, karg, varg, function ()&lt;br /&gt;
		return ctx.frame:expandTemplate(model)&lt;br /&gt;
	end)&lt;br /&gt;
	return context_iterate(ctx, argc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|mapping_by_invoking|module name|function&lt;br /&gt;
--            name|[call style]|[let]|[...]|[number of additional&lt;br /&gt;
--            arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe to&lt;br /&gt;
library.mapping_by_invoking = function (ctx)&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local mname&lt;br /&gt;
	local fname&lt;br /&gt;
	if opts[1] ~= nil then mname = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if mname == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘mapping_by_invoking’: No module name was provided&#039;, 0) end&lt;br /&gt;
	if opts[2] ~= nil then fname = opts[2]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if fname == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘mapping_by_invoking’: No function name was provided&#039;, 0) end&lt;br /&gt;
	local margs, argc, looptype, karg, varg = load_callback_opts(opts, 2,&lt;br /&gt;
		mapping_styles.values_only)&lt;br /&gt;
	local model = { title = &#039;Module:&#039; .. mname, args = margs }&lt;br /&gt;
	local mfunc = require(model.title)[fname]&lt;br /&gt;
	if mfunc == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘mapping_by_invoking’: The function ‘&#039; .. fname ..&lt;br /&gt;
		&#039;’ does not exist&#039;, 0) end&lt;br /&gt;
	value_maps[looptype](ctx.params, margs, karg, varg, function ()&lt;br /&gt;
		return tostring(mfunc(ctx.frame:newChild(model)))&lt;br /&gt;
	end)&lt;br /&gt;
	return context_iterate(ctx, argc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|mapping_by_magic|parser function|[call&lt;br /&gt;
--            style]|[let]|[...][number of additional arguments]|[argument&lt;br /&gt;
--            1]|[argument 2]|[...]|[argument N]|pipe to&lt;br /&gt;
library.mapping_by_magic = function (ctx)&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local magic&lt;br /&gt;
	if opts[1] ~= nil then magic = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if magic == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘mapping_by_magic’: No parser function was provided&#039;, 0) end&lt;br /&gt;
	local margs, argc, looptype, karg, varg = load_callback_opts(opts, 1,&lt;br /&gt;
		mapping_styles.values_only)&lt;br /&gt;
	value_maps[looptype](ctx.params, margs, karg, varg, function ()&lt;br /&gt;
		return ctx.frame:callParserFunction(magic, margs)&lt;br /&gt;
	end)&lt;br /&gt;
	return context_iterate(ctx, argc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|mapping_by_replacing|target|replace|[count]|[plain&lt;br /&gt;
--            flag]|pipe to&lt;br /&gt;
library.mapping_by_replacing = function (ctx)&lt;br /&gt;
	local ptn, repl, nmax, flg, argc, die =&lt;br /&gt;
		load_replace_args(ctx.pipe, &#039;mapping_by_replacing&#039;)&lt;br /&gt;
	if die then return context_iterate(ctx, argc) end&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	if flg == 3 then&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			if val == ptn then tbl[key] = repl end&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		if flg == 2 then&lt;br /&gt;
			-- Copied from Module:String&#039;s `str._escapePattern()`&lt;br /&gt;
			ptn = ptn:gsub(&#039;[%(%)%.%%%+%-%*%?%[%^%$%]]&#039;, &#039;%%%0&#039;)&lt;br /&gt;
		end&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			tbl[key] = val:gsub(ptn, repl, nmax)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return context_iterate(ctx, argc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|mapping_by_mixing|mixing string|pipe to&lt;br /&gt;
library.mapping_by_mixing = function (ctx)&lt;br /&gt;
	if ctx.pipe[1] == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘mapping_by_mixing’: No mixing string was provided&#039;, 0) end&lt;br /&gt;
	local mix = ctx.pipe[1]&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	if mix == &#039;$#&#039; then&lt;br /&gt;
		for key in pairs(tbl) do tbl[key] = key end&lt;br /&gt;
		return context_iterate(ctx, 2)&lt;br /&gt;
	end&lt;br /&gt;
	local skel, cnv, n_parts = parse_placeholder_string(mix)&lt;br /&gt;
	for key, val in pairs(tbl) do&lt;br /&gt;
		for idx = 2, n_parts, 2 do&lt;br /&gt;
			if skel[idx] then cnv[idx] = val else cnv[idx] = tostring(key) end&lt;br /&gt;
		end&lt;br /&gt;
		tbl[key] = table.concat(cnv)&lt;br /&gt;
	end&lt;br /&gt;
	return context_iterate(ctx, 2)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|mapping_to_names|pipe to&lt;br /&gt;
--[[&lt;br /&gt;
library.mapping_to_names = function (ctx)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	for key in pairs(tbl) do tbl[key] = key end&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
]]--&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|converting_names_to_lowercase|pipe to&lt;br /&gt;
library.converting_names_to_lowercase = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.params` might be the original metatable! As a modifier,&lt;br /&gt;
	-- this function MUST create a copy of it before returning&lt;br /&gt;
	local cache = {}&lt;br /&gt;
	for key, val in pairs(ctx.params) do&lt;br /&gt;
		if type(key) == &#039;string&#039; then cache[key:lower()] = val else&lt;br /&gt;
		cache[key] = val end&lt;br /&gt;
	end&lt;br /&gt;
	ctx.params = cache&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|converting_names_to_uppercase|pipe to&lt;br /&gt;
library.converting_names_to_uppercase = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.params` might be the original metatable! As a modifier,&lt;br /&gt;
	-- this function MUST create a copy of it before returning&lt;br /&gt;
	local cache = {}&lt;br /&gt;
	for key, val in pairs(ctx.params) do&lt;br /&gt;
		if type(key) == &#039;string&#039; then cache[key:upper()] = val else&lt;br /&gt;
		cache[key] = val end&lt;br /&gt;
	end&lt;br /&gt;
	ctx.params = cache&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|renaming_by_calling|template name|[call&lt;br /&gt;
--            style]|[let]|[...][number of additional parameters]|[parameter&lt;br /&gt;
--            1]|[parameter 2]|[...]|[parameter N]|pipe to&lt;br /&gt;
library.renaming_by_calling = function (ctx)&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local tname&lt;br /&gt;
	if opts[1] ~= nil then tname = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if tname == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘renaming_by_calling’: No template name was provided&#039;, 0) end&lt;br /&gt;
	local rargs, argc, looptype, karg, varg = load_callback_opts(opts, 1,&lt;br /&gt;
		mapping_styles.names_only)&lt;br /&gt;
	local model = { title = tname, args = rargs }&lt;br /&gt;
	map_names(ctx.params, rargs, karg, varg, looptype, function ()&lt;br /&gt;
		return ctx.frame:expandTemplate(model)&lt;br /&gt;
	end)&lt;br /&gt;
	return context_iterate(ctx, argc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|renaming_by_invoking|module name|function&lt;br /&gt;
--            name|[call style]|[let]|[...]|[number of additional&lt;br /&gt;
--            arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe to&lt;br /&gt;
library.renaming_by_invoking = function (ctx)&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local mname&lt;br /&gt;
	local fname&lt;br /&gt;
	if opts[1] ~= nil then mname = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if mname == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘renaming_by_invoking’: No module name was provided&#039;, 0) end&lt;br /&gt;
	if opts[2] ~= nil then fname = opts[2]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if fname == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘renaming_by_invoking’: No function name was provided&#039;, 0) end&lt;br /&gt;
	local rargs, argc, looptype, karg, varg = load_callback_opts(opts, 2,&lt;br /&gt;
		mapping_styles.names_only)&lt;br /&gt;
	local model = { title = &#039;Module:&#039; .. mname, args = rargs }&lt;br /&gt;
	local mfunc = require(model.title)[fname]&lt;br /&gt;
	if mfunc == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘renaming_by_invoking’: The function ‘&#039; .. fname ..&lt;br /&gt;
		&#039;’ does not exist&#039;, 0) end&lt;br /&gt;
	map_names(ctx.params, rargs, karg, varg, looptype, function ()&lt;br /&gt;
		local tmp = mfunc(ctx.frame:newChild(model))&lt;br /&gt;
		return tonumber(tmp) or tostring(tmp)&lt;br /&gt;
	end)&lt;br /&gt;
	return context_iterate(ctx, argc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|renaming_by_magic|parser function|[call&lt;br /&gt;
--            style]|[let]|[...][number of additional arguments]|[argument&lt;br /&gt;
--            1]|[argument 2]|[...]|[argument N]|pipe to&lt;br /&gt;
library.renaming_by_magic = function (ctx)&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local magic&lt;br /&gt;
	if opts[1] ~= nil then magic = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if magic == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘renaming_by_magic’: No parser function was provided&#039;, 0) end&lt;br /&gt;
	local rargs, argc, looptype, karg, varg = load_callback_opts(opts, 1,&lt;br /&gt;
		mapping_styles.names_only)&lt;br /&gt;
	map_names(ctx.params, rargs, karg, varg, looptype, function ()&lt;br /&gt;
		return ctx.frame:callParserFunction(magic, rargs)&lt;br /&gt;
	end)&lt;br /&gt;
	return context_iterate(ctx, argc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|renaming_by_replacing|target|replace|[count]|[plain&lt;br /&gt;
--            flag]|pipe to&lt;br /&gt;
library.renaming_by_replacing = function (ctx)&lt;br /&gt;
	local ptn, repl, nmax, flg, argc, die =&lt;br /&gt;
		load_replace_args(ctx.pipe, &#039;renaming_by_replacing&#039;)&lt;br /&gt;
	if die then return context_iterate(ctx, argc) end&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	if flg == 3 then&lt;br /&gt;
		local key = tonumber(ptn) or ptn:match&#039;^%s*(.-)%s*$&#039;&lt;br /&gt;
		local val = tbl[key]&lt;br /&gt;
		if val ~= nil then&lt;br /&gt;
			tbl[key] = nil&lt;br /&gt;
			tbl[tonumber(repl) or repl:match&#039;^%s*(.-)%s*$&#039;] = val&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		if flg == 2 then&lt;br /&gt;
			-- Copied from Module:String&#039;s `str._escapePattern()`&lt;br /&gt;
			ptn = ptn:gsub(&#039;[%(%)%.%%%+%-%*%?%[%^%$%]]&#039;, &#039;%%%0&#039;)&lt;br /&gt;
		end&lt;br /&gt;
		local cache = {}&lt;br /&gt;
		for key, val in pairs(tbl) do&lt;br /&gt;
			steal_if_renamed(val, tbl, key, cache,&lt;br /&gt;
				tostring(key):gsub(ptn, repl, nmax))&lt;br /&gt;
		end&lt;br /&gt;
		for key, val in pairs(cache) do tbl[key] = val end&lt;br /&gt;
	end&lt;br /&gt;
	return context_iterate(ctx, argc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|renaming_by_mixing|mixing string|pipe to&lt;br /&gt;
library.renaming_by_mixing = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.params` might be the original metatable! As a modifier,&lt;br /&gt;
	-- this function MUST create a copy of it before returning&lt;br /&gt;
	if ctx.pipe[1] == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘renaming_by_mixing’: No mixing string was provided&#039;, 0) end&lt;br /&gt;
	local mix = ctx.pipe[1]:match&#039;^%s*(.-)%s*$&#039;&lt;br /&gt;
	local cache = {}&lt;br /&gt;
	if mix == &#039;$@&#039; then&lt;br /&gt;
		for _, val in pairs(ctx.params) do cache[val] = val end&lt;br /&gt;
	else&lt;br /&gt;
		local skel, canvas, n_parts = parse_placeholder_string(mix)&lt;br /&gt;
		local tmp&lt;br /&gt;
		for key, val in pairs(ctx.params) do&lt;br /&gt;
			for idx = 2, n_parts, 2 do&lt;br /&gt;
				if skel[idx] then canvas[idx] = val&lt;br /&gt;
				else canvas[idx] = tostring(key) end&lt;br /&gt;
			end&lt;br /&gt;
			tmp = table.concat(canvas)&lt;br /&gt;
			cache[tonumber(tmp) or tmp] = val&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	ctx.params = cache&lt;br /&gt;
	return context_iterate(ctx, 2)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|renaming_to_values|pipe to&lt;br /&gt;
--[[&lt;br /&gt;
library.renaming_to_values = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.params` might be the original metatable! As a modifier,&lt;br /&gt;
	-- this function MUST create a copy of it before returning&lt;br /&gt;
	local cache = {}&lt;br /&gt;
	for _, val in pairs(ctx.params) do cache[val] = val end&lt;br /&gt;
	ctx.params = cache&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
]]--&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|grouping_by_calling|template&lt;br /&gt;
--            name|[let]|[...]|[number of additional arguments]|[argument&lt;br /&gt;
--            1]|[argument 2]|[...]|[argument N]|pipe to&lt;br /&gt;
library.grouping_by_calling = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.params` might be the original metatable! As a modifier,&lt;br /&gt;
	-- this function MUST create a copy of it before returning&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local tmp&lt;br /&gt;
	if opts[1] ~= nil then tmp = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if tmp == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘grouping_by_calling’: No template name was provided&#039;, 0) end&lt;br /&gt;
	local model = { title = tmp }&lt;br /&gt;
	local tmp, argc = load_child_opts(opts, 2, 0)&lt;br /&gt;
	local gargs = {}&lt;br /&gt;
	for key, val in pairs(tmp) do&lt;br /&gt;
		if type(key) == &#039;number&#039; and key &amp;lt; 1 then gargs[key - 1] = val&lt;br /&gt;
		else gargs[key] = val end&lt;br /&gt;
	end&lt;br /&gt;
	local groups = make_groups(ctx.params)&lt;br /&gt;
	for gid, group in pairs(groups) do&lt;br /&gt;
		for key, val in pairs(gargs) do group[key] = val end&lt;br /&gt;
		group[0] = gid&lt;br /&gt;
		model.args = group&lt;br /&gt;
		groups[gid] = ctx.frame:expandTemplate(model)&lt;br /&gt;
	end&lt;br /&gt;
	ctx.params = groups&lt;br /&gt;
	return context_iterate(ctx, argc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|parsing|string to parse|[trim flag]|[iteration&lt;br /&gt;
--            delimiter setter]|[...]|[key-value delimiter setter]|[...]|pipe to&lt;br /&gt;
library.parsing = function (ctx)&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	if opts[1] == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘parsing’: No string to parse was provided&#039;, 0) end&lt;br /&gt;
	local isep, iplain, psep, pplain, trimnamed, trimunnamed, argc =&lt;br /&gt;
		load_parse_opts(opts, 2)&lt;br /&gt;
	parse_parameter_string(ctx.params, opts[1], isep, iplain, psep, pplain,&lt;br /&gt;
		trimnamed, trimunnamed)&lt;br /&gt;
	return context_iterate(ctx, argc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|reinterpreting|parameter to reinterpret|[trim&lt;br /&gt;
--            flag]|[iteration delimiter setter]|[...]|[key-value delimiter&lt;br /&gt;
--            setter]|[...]|pipe to&lt;br /&gt;
library.reinterpreting = function (ctx)&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	if opts[1] == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘reinterpreting’: No parameter to reinterpret was provided&#039;, 0) end&lt;br /&gt;
	local isep, iplain, psep, pplain, trimnamed, trimunnamed, argc =&lt;br /&gt;
		load_parse_opts(opts, 2)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	local tmp = tonumber(opts[1]) or opts[1]:match&#039;^%s*(.-)%s*$&#039;&lt;br /&gt;
	local str = tbl[tmp]&lt;br /&gt;
	if str ~= nil then&lt;br /&gt;
		tbl[tmp] = nil&lt;br /&gt;
		parse_parameter_string(tbl, str, isep, iplain, psep, pplain,&lt;br /&gt;
			trimnamed, trimunnamed)&lt;br /&gt;
	end&lt;br /&gt;
	return context_iterate(ctx, argc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|mixing_names_and_values|mixing string|pipe to&lt;br /&gt;
library.mixing_names_and_values = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.params` might be the original metatable! As a modifier,&lt;br /&gt;
	-- this function MUST create a copy of it before returning&lt;br /&gt;
	if ctx.pipe[1] == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘mixing_names_and_values’: No mixing string was provided for parameter names&#039;, 0) end&lt;br /&gt;
	if ctx.pipe[2] == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘mixing_names_and_values’: No mixing string was provided for parameter values&#039;, 0) end&lt;br /&gt;
	local mix_k = ctx.pipe[1]:match&#039;^%s*(.-)%s*$&#039;&lt;br /&gt;
	local mix_v = ctx.pipe[2]&lt;br /&gt;
	local cache = {}&lt;br /&gt;
	if mix_k == &#039;$@&#039; and mix_v == &#039;$@&#039; then&lt;br /&gt;
		for _, val in pairs(ctx.params) do cache[val] = val end&lt;br /&gt;
	elseif mix_k == &#039;$@&#039; and mix_v == &#039;$#&#039; then&lt;br /&gt;
		for key, val in pairs(ctx.params) do cache[val] = key end&lt;br /&gt;
	elseif mix_k == &#039;$#&#039; and mix_v == &#039;$#&#039; then&lt;br /&gt;
		for _, val in pairs(ctx.params) do cache[key] = key end&lt;br /&gt;
	else&lt;br /&gt;
		local skel_k, cnv_k, n_parts_k = parse_placeholder_string(mix_k)&lt;br /&gt;
		local skel_v, cnv_v, n_parts_v = parse_placeholder_string(mix_v)&lt;br /&gt;
		local tmp&lt;br /&gt;
		for key, val in pairs(ctx.params) do&lt;br /&gt;
			tmp = tostring(key)&lt;br /&gt;
			for idx = 2, n_parts_k, 2 do&lt;br /&gt;
				if skel_k[idx] then cnv_k[idx] = val else cnv_k[idx] = tmp end&lt;br /&gt;
			end&lt;br /&gt;
			for idx = 2, n_parts_v, 2 do&lt;br /&gt;
				if skel_v[idx] then cnv_v[idx] = val else cnv_v[idx] = tmp end&lt;br /&gt;
			end&lt;br /&gt;
			tmp = table.concat(cnv_k)&lt;br /&gt;
			cache[tonumber(tmp) or tmp] = table.concat(cnv_v)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	ctx.params = cache&lt;br /&gt;
	return context_iterate(ctx, 3)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|swapping_names_and_values|pipe to&lt;br /&gt;
--[[&lt;br /&gt;
library.swapping_names_and_values = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.params` might be the original metatable! As a modifier,&lt;br /&gt;
	-- this function MUST create a copy of it before returning&lt;br /&gt;
	local cache = {}&lt;br /&gt;
	for key, val in pairs(ctx.params) do cache[val] = key end&lt;br /&gt;
	ctx.params = cache&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
]]--&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|combining_by_calling|template name|new parameter&lt;br /&gt;
--            name|pipe to&lt;br /&gt;
library.combining_by_calling = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.params` might be the original metatable! As a modifier,&lt;br /&gt;
	-- this function MUST create a copy of it before returning&lt;br /&gt;
	local tname = ctx.pipe[1]&lt;br /&gt;
	if tname ~= nil then tname = tname:match&#039;^%s*(.*%S)&#039;&lt;br /&gt;
	else error(modulename ..&lt;br /&gt;
		&#039;, ‘combining_by_calling’: No template name was provided&#039;, 0) end&lt;br /&gt;
	local merge_into = ctx.pipe[2]&lt;br /&gt;
	if merge_into == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘combining_by_calling’: No parameter name was provided&#039;, 0) end&lt;br /&gt;
	merge_into = tonumber(merge_into) or merge_into:match&#039;^%s*(.-)%s*$&#039;&lt;br /&gt;
	ctx.params = {&lt;br /&gt;
		[merge_into] = ctx.frame:expandTemplate{&lt;br /&gt;
			title = tname,&lt;br /&gt;
			args = ctx.params&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	return context_iterate(ctx, 3)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|snapshotting|pipe to&lt;br /&gt;
library.snapshotting = function (ctx)&lt;br /&gt;
	push_cloned_stack(ctx, ctx.params)&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|remembering|pipe to&lt;br /&gt;
library.remembering = function (ctx)&lt;br /&gt;
	push_cloned_stack(ctx, ctx.oparams)&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|entering_substack|[new]|pipe to&lt;br /&gt;
library.entering_substack = function (ctx)&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	local ncurrparent = ctx.n_parents + 1&lt;br /&gt;
	if ctx.parents == nil then ctx.parents = { tbl }&lt;br /&gt;
	else ctx.parents[ncurrparent] = tbl end&lt;br /&gt;
	ctx.n_parents = ncurrparent&lt;br /&gt;
	if ctx.pipe[1] ~= nil and ctx.pipe[1]:match&#039;^%s*new%s*$&#039; then&lt;br /&gt;
		ctx.params = {}&lt;br /&gt;
		return context_iterate(ctx, 2)&lt;br /&gt;
	end&lt;br /&gt;
	local currsnap = ctx.n_children&lt;br /&gt;
	if currsnap &amp;gt; 0 then&lt;br /&gt;
		ctx.params = ctx.children[currsnap]&lt;br /&gt;
		ctx.children[currsnap] = nil&lt;br /&gt;
		ctx.n_children = currsnap - 1&lt;br /&gt;
	else&lt;br /&gt;
		local newparams = {}&lt;br /&gt;
		for key, val in pairs(tbl) do newparams[key] = val end&lt;br /&gt;
		ctx.params = newparams&lt;br /&gt;
	end&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|pulling|parameter name|pipe to&lt;br /&gt;
library.pulling = function (ctx)&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	if opts[1] == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘pulling’: No parameter to pull was provided&#039;, 0) end&lt;br /&gt;
	local parent&lt;br /&gt;
	local tmp = ctx.n_parents&lt;br /&gt;
	if tmp &amp;lt; 1 then parent = ctx.oparams else parent = ctx.parents[tmp] end&lt;br /&gt;
	tmp = tonumber(opts[1]) or opts[1]:match&#039;^%s*(.-)%s*$&#039;&lt;br /&gt;
	if parent[tmp] ~= nil then ctx.params[tmp] = parent[tmp] end&lt;br /&gt;
	return context_iterate(ctx, 2)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|detaching_substack|pipe to&lt;br /&gt;
library.detaching_substack = function (ctx)&lt;br /&gt;
	local ncurrparent = ctx.n_parents&lt;br /&gt;
	if ncurrparent &amp;lt; 1 then error(modulename ..&lt;br /&gt;
		&#039;, ‘detaching_substack’: No substack has been created&#039;, 0) end&lt;br /&gt;
	local parent = ctx.parents[ncurrparent]&lt;br /&gt;
	for key in pairs(ctx.params) do parent[key] = nil end&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|leaving_substack|pipe to&lt;br /&gt;
library.leaving_substack = function (ctx)&lt;br /&gt;
	local ncurrparent = ctx.n_parents&lt;br /&gt;
	if ncurrparent &amp;lt; 1 then error(modulename ..&lt;br /&gt;
		&#039;, ‘leaving_substack’: No substack has been created&#039;, 0) end&lt;br /&gt;
	local currsnap = ctx.n_children + 1&lt;br /&gt;
	if ctx.children == nil then ctx.children = { ctx.params }&lt;br /&gt;
	else ctx.children[currsnap] = ctx.params end&lt;br /&gt;
	ctx.params = ctx.parents[ncurrparent]&lt;br /&gt;
	ctx.parents[ncurrparent] = nil&lt;br /&gt;
	ctx.n_parents = ncurrparent - 1&lt;br /&gt;
	ctx.n_children = currsnap&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|merging_substack|pipe to&lt;br /&gt;
library.merging_substack = function (ctx)&lt;br /&gt;
	local ncurrparent = ctx.n_parents&lt;br /&gt;
	if ncurrparent &amp;lt; 1 then error(modulename ..&lt;br /&gt;
		&#039;, ‘merging_substack’: No substack has been created&#039;, 0) end&lt;br /&gt;
	local parent = ctx.parents[ncurrparent]&lt;br /&gt;
	local child = ctx.params&lt;br /&gt;
	ctx.params = parent&lt;br /&gt;
	ctx.parents[ncurrparent] = nil&lt;br /&gt;
	ctx.n_parents = ncurrparent - 1&lt;br /&gt;
	for key, val in pairs(child) do parent[key] = val end&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|flushing|pipe to&lt;br /&gt;
library.flushing = function (ctx)&lt;br /&gt;
	if ctx.n_children &amp;lt; 1 then error(modulename ..&lt;br /&gt;
		&#039;, ‘flushing’: There are no substacks to flush&#039;, 0) end&lt;br /&gt;
	local parent = ctx.params&lt;br /&gt;
	local currsnap = ctx.n_children&lt;br /&gt;
	for key, val in pairs(ctx.children[currsnap]) do parent[key] = val end&lt;br /&gt;
	ctx.children[currsnap] = nil&lt;br /&gt;
	ctx.n_children = currsnap - 1&lt;br /&gt;
	return context_iterate(ctx, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	--[[ Functions ]]--&lt;br /&gt;
	-----------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|count&lt;br /&gt;
library.count = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.pipe` and `ctx.params` might be the original metatables!&lt;br /&gt;
	local retval = 0&lt;br /&gt;
	for _ in ctx.iterfunc(ctx.params) do retval = retval + 1 end&lt;br /&gt;
	if ctx.subset == -1 then retval = retval - #ctx.params end&lt;br /&gt;
	ctx.text = retval&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:args|concat_and_call|template name|[prepend 1]|[prepend 2]&lt;br /&gt;
--            |[...]|[item n]|[named item 1=value 1]|[...]|[named item n=value&lt;br /&gt;
--            n]|[...]&lt;br /&gt;
library.concat_and_call = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.params` might be the original metatable!&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local tname&lt;br /&gt;
	if opts[1] ~= nil then tname = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if tname == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘concat_and_call’: No template name was provided&#039;, 0) end&lt;br /&gt;
	remove_numeric_keys(opts, 1, 1)&lt;br /&gt;
	ctx.text = ctx.frame:expandTemplate{&lt;br /&gt;
		title = tname,&lt;br /&gt;
		args = concat_params(ctx)&lt;br /&gt;
	}&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:args|concat_and_invoke|module name|function name|[prepend&lt;br /&gt;
--            1]|[prepend 2]|[...]|[item n]|[named item 1=value 1]|[...]|[named&lt;br /&gt;
--            item n=value n]|[...]&lt;br /&gt;
library.concat_and_invoke = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.params` might be the original metatable!&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local mname&lt;br /&gt;
	local fname&lt;br /&gt;
	if opts[1] ~= nil then mname = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if mname == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘concat_and_invoke’: No module name was provided&#039;, 0) end&lt;br /&gt;
	if opts[2] ~= nil then fname = opts[2]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if fname == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘concat_and_invoke’: No function name was provided&#039;, 0) end&lt;br /&gt;
	remove_numeric_keys(opts, 1, 2)&lt;br /&gt;
	local mfunc = require(&#039;Module:&#039; .. mname)[fname]&lt;br /&gt;
	if mfunc == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘concat_and_invoke’: The function ‘&#039; .. fname ..&lt;br /&gt;
		&#039;’ does not exist&#039;, 0) end&lt;br /&gt;
	ctx.text = mfunc(ctx.frame:newChild{&lt;br /&gt;
		title = &#039;Module:&#039; .. mname,&lt;br /&gt;
		args = concat_params(ctx)&lt;br /&gt;
	})&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:args|concat_and_magic|parser function|[prepend 1]|[prepend&lt;br /&gt;
--            2]|[...]|[item n]|[named item 1=value 1]|[...]|[named item n=&lt;br /&gt;
--            value n]|[...]&lt;br /&gt;
library.concat_and_magic = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.params` might be the original metatable!&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local magic&lt;br /&gt;
	if opts[1] ~= nil then magic = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if magic == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘concat_and_magic’: No parser function was provided&#039;, 0) end&lt;br /&gt;
	remove_numeric_keys(opts, 1, 1)&lt;br /&gt;
	ctx.text = ctx.frame:callParserFunction(magic, concat_params(ctx))&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|value_of|parameter name&lt;br /&gt;
library.value_of = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.pipe` and `ctx.params` might be the original metatables!&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local kstr&lt;br /&gt;
	if opts[1] ~= nil then kstr = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if kstr == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘value_of’: No parameter name was provided&#039;, 0) end&lt;br /&gt;
	local knum = tonumber(kstr)&lt;br /&gt;
	local len = #ctx.params  -- No worries: unused when in first position&lt;br /&gt;
	local val = ctx.params[knum or kstr]&lt;br /&gt;
	if val ~= nil and (&lt;br /&gt;
		ctx.subset ~= -1 or knum == nil or knum &amp;gt; len or knum &amp;lt; 1&lt;br /&gt;
	) and (&lt;br /&gt;
		ctx.subset ~= 1 or (knum ~= nil and knum &amp;lt;= len and knum &amp;gt; 0)&lt;br /&gt;
	) then&lt;br /&gt;
		ctx.text = (ctx.header or &#039;&#039;) .. val .. (ctx.footer or &#039;&#039;)&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	ctx.text = ctx.ifngiven or &#039;&#039;&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|list&lt;br /&gt;
library.list = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.pipe` might be the original metatable!&lt;br /&gt;
	local kvs = ctx.pairsep or &#039;&#039;&lt;br /&gt;
	local pps = ctx.itersep or &#039;&#039;&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local nss = 0&lt;br /&gt;
	flush_params(&lt;br /&gt;
		ctx,&lt;br /&gt;
		function (key, val)&lt;br /&gt;
			ret[nss + 1] = pps&lt;br /&gt;
			ret[nss + 2] = key&lt;br /&gt;
			ret[nss + 3] = kvs&lt;br /&gt;
			ret[nss + 4] = val&lt;br /&gt;
			nss = nss + 4&lt;br /&gt;
		end&lt;br /&gt;
	)&lt;br /&gt;
	if nss &amp;gt; 0 then&lt;br /&gt;
		if nss &amp;gt; 4 and ctx.lastsep ~= nil then&lt;br /&gt;
			ret[nss - 3] = ctx.lastsep&lt;br /&gt;
		end&lt;br /&gt;
		ret[1] = ctx.header or &#039;&#039;&lt;br /&gt;
		if ctx.footer ~= nil then ret[nss + 1] = ctx.footer end&lt;br /&gt;
		ctx.text = table.concat(ret)&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	ctx.text = ctx.ifngiven or &#039;&#039;&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|list_values&lt;br /&gt;
library.list_values = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.pipe` might be the original metatable!&lt;br /&gt;
	-- NOTE: `library.coins()` and `library.unique_coins()` rely on us&lt;br /&gt;
	local pps = ctx.itersep or &#039;&#039;&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local nss = 0&lt;br /&gt;
	flush_params(&lt;br /&gt;
		ctx,&lt;br /&gt;
		function (key, val)&lt;br /&gt;
			ret[nss + 1] = pps&lt;br /&gt;
			ret[nss + 2] = val&lt;br /&gt;
			nss = nss + 2&lt;br /&gt;
		end&lt;br /&gt;
	)&lt;br /&gt;
	if nss &amp;gt; 0 then&lt;br /&gt;
		if nss &amp;gt; 2 and ctx.lastsep ~= nil then&lt;br /&gt;
			ret[nss - 1] = ctx.lastsep&lt;br /&gt;
		end&lt;br /&gt;
		ret[1] = ctx.header or &#039;&#039;&lt;br /&gt;
		if ctx.footer ~= nil then ret[nss + 1] = ctx.footer end&lt;br /&gt;
		ctx.text = table.concat(ret)&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	ctx.text = ctx.ifngiven or &#039;&#039;&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|coins|[first coin = value 1]|[second coin = value&lt;br /&gt;
--            2]|[...]|[last coin = value N]&lt;br /&gt;
library.coins = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.pipe` might be the original metatable!&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	for key, val in pairs(tbl) do tbl[key] = opts[tonumber(val) or val] end&lt;br /&gt;
	return library.list_values(ctx)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|unique_coins|[first coin = value 1]|[second coin =&lt;br /&gt;
--            value 2]|[...]|[last coin = value N]&lt;br /&gt;
library.unique_coins = function (ctx)&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local tbl = ctx.params&lt;br /&gt;
	local tmp&lt;br /&gt;
	for key, val in pairs(tbl) do&lt;br /&gt;
		tmp = tonumber(val) or val&lt;br /&gt;
		tbl[key] = opts[tmp]&lt;br /&gt;
		opts[tmp] = nil&lt;br /&gt;
	end&lt;br /&gt;
	return library.list_values(ctx)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|for_each|wikitext&lt;br /&gt;
library.for_each = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.pipe` might be the original metatable!&lt;br /&gt;
	local txt = ctx.pipe[1] or &#039;&#039;&lt;br /&gt;
	local pps = ctx.itersep or &#039;&#039;&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local nss = 0&lt;br /&gt;
	local skel, cnv, n_parts = parse_placeholder_string(txt)&lt;br /&gt;
	flush_params(&lt;br /&gt;
		ctx,&lt;br /&gt;
		function (key, val)&lt;br /&gt;
			for idx = 2, n_parts, 2 do&lt;br /&gt;
				if skel[idx] then cnv[idx] = val&lt;br /&gt;
				else cnv[idx] = tostring(key) end&lt;br /&gt;
			end&lt;br /&gt;
			ret[nss + 1] = pps&lt;br /&gt;
			ret[nss + 2] = table.concat(cnv)&lt;br /&gt;
			nss = nss + 2&lt;br /&gt;
		end&lt;br /&gt;
	)&lt;br /&gt;
	if nss &amp;gt; 0 then&lt;br /&gt;
		if nss &amp;gt; 2 and ctx.lastsep ~= nil then&lt;br /&gt;
			ret[nss - 1] = ctx.lastsep&lt;br /&gt;
		end&lt;br /&gt;
		ret[1] = ctx.header or &#039;&#039;&lt;br /&gt;
		if ctx.footer ~= nil then ret[nss + 1] = ctx.footer end&lt;br /&gt;
		ctx.text = table.concat(ret)&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	ctx.text = ctx.ifngiven or &#039;&#039;&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|call_for_each|template name|[append 1]|[append 2]&lt;br /&gt;
--            |[...]|[append n]|[named param 1=value 1]|[...]|[named param&lt;br /&gt;
--            n=value n]|[...]&lt;br /&gt;
library.call_for_each = function (ctx)&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local tname&lt;br /&gt;
	if opts[1] ~= nil then tname = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if tname == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘call_for_each’: No template name was provided&#039;, 0) end&lt;br /&gt;
	local model = { title = tname, args = opts }&lt;br /&gt;
	local ccs = ctx.itersep or &#039;&#039;&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local nss = 0&lt;br /&gt;
	table.insert(opts, 1, true)&lt;br /&gt;
	flush_params(&lt;br /&gt;
		ctx,&lt;br /&gt;
		function (key, val)&lt;br /&gt;
			opts[1] = key&lt;br /&gt;
			opts[2] = val&lt;br /&gt;
			ret[nss + 1] = ccs&lt;br /&gt;
			ret[nss + 2] = ctx.frame:expandTemplate(model)&lt;br /&gt;
			nss = nss + 2&lt;br /&gt;
		end&lt;br /&gt;
	)&lt;br /&gt;
	if nss &amp;gt; 0 then&lt;br /&gt;
		if nss &amp;gt; 2 and ctx.lastsep ~= nil then&lt;br /&gt;
			ret[nss - 1] = ctx.lastsep&lt;br /&gt;
		end&lt;br /&gt;
		ret[1] = ctx.header or &#039;&#039;&lt;br /&gt;
		if ctx.footer ~= nil then ret[nss + 1] = ctx.footer end&lt;br /&gt;
		ctx.text = table.concat(ret)&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	ctx.text = ctx.ifngiven or &#039;&#039;&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|invoke_for_each|module name|module function|[append&lt;br /&gt;
--            1]|[append 2]|[...]|[append n]|[named param 1=value 1]|[...]&lt;br /&gt;
--            |[named param n=value n]|[...]&lt;br /&gt;
library.invoke_for_each = function (ctx)&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local mname&lt;br /&gt;
	local fname&lt;br /&gt;
	if opts[1] ~= nil then mname = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if mname == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘invoke_for_each’: No module name was provided&#039;, 0) end&lt;br /&gt;
	if opts[2] ~= nil then fname = opts[2]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if fname == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘invoke_for_each’: No function name was provided&#039;, 0) end&lt;br /&gt;
	local model = { title = &#039;Module:&#039; .. mname, args = opts }&lt;br /&gt;
	local mfunc = require(model.title)[fname]&lt;br /&gt;
	local ccs = ctx.itersep or &#039;&#039;&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local nss = 0&lt;br /&gt;
	flush_params(&lt;br /&gt;
		ctx,&lt;br /&gt;
		function (key, val)&lt;br /&gt;
			opts[1] = key&lt;br /&gt;
			opts[2] = val&lt;br /&gt;
			ret[nss + 1] = ccs&lt;br /&gt;
			ret[nss + 2] = mfunc(ctx.frame:newChild(model))&lt;br /&gt;
			nss = nss + 2&lt;br /&gt;
		end&lt;br /&gt;
	)&lt;br /&gt;
	if nss &amp;gt; 0 then&lt;br /&gt;
		if nss &amp;gt; 2 and ctx.lastsep ~= nil then&lt;br /&gt;
			ret[nss - 1] = ctx.lastsep&lt;br /&gt;
		end&lt;br /&gt;
		ret[1] = ctx.header or &#039;&#039;&lt;br /&gt;
		if ctx.footer ~= nil then ret[nss + 1] = ctx.footer end&lt;br /&gt;
		ctx.text = table.concat(ret)&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	ctx.text = ctx.ifngiven or &#039;&#039;&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|magic_for_each|parser function|[append 1]|[append 2]&lt;br /&gt;
--            |[...]|[append n]|[named param 1=value 1]|[...]|[named param&lt;br /&gt;
--            n=value n]|[...]&lt;br /&gt;
library.magic_for_each = function (ctx)&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local magic&lt;br /&gt;
	if opts[1] ~= nil then magic = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if magic == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘magic_for_each’: No parser function was provided&#039;, 0) end&lt;br /&gt;
	local ccs = ctx.itersep or &#039;&#039;&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local nss = 0&lt;br /&gt;
	table.insert(opts, 1, true)&lt;br /&gt;
	flush_params(&lt;br /&gt;
		ctx,&lt;br /&gt;
		function (key, val)&lt;br /&gt;
			opts[1] = key&lt;br /&gt;
			opts[2] = val&lt;br /&gt;
			ret[nss + 1] = ccs&lt;br /&gt;
			ret[nss + 2] = ctx.frame:callParserFunction(magic, opts)&lt;br /&gt;
			nss = nss + 2&lt;br /&gt;
		end&lt;br /&gt;
	)&lt;br /&gt;
	if nss &amp;gt; 0 then&lt;br /&gt;
		if nss &amp;gt; 2 and ctx.lastsep ~= nil then&lt;br /&gt;
			ret[nss - 1] = ctx.lastsep&lt;br /&gt;
		end&lt;br /&gt;
		ret[1] = ctx.header or &#039;&#039;&lt;br /&gt;
		if ctx.footer ~= nil then ret[nss + 1] = ctx.footer end&lt;br /&gt;
		ctx.text = table.concat(ret)&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	ctx.text = ctx.ifngiven or &#039;&#039;&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|call_for_each_value|template name|[append 1]|[append&lt;br /&gt;
--            2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param&lt;br /&gt;
--            n=value n]|[...]&lt;br /&gt;
library.call_for_each_value = function (ctx)&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local tname&lt;br /&gt;
	if opts[1] ~= nil then tname = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if tname == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘call_for_each_value’: No template name was provided&#039;, 0) end&lt;br /&gt;
	local model = { title = tname, args = opts }&lt;br /&gt;
	local ccs = ctx.itersep or &#039;&#039;&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local nss = 0&lt;br /&gt;
	flush_params(&lt;br /&gt;
		ctx,&lt;br /&gt;
		function (key, val)&lt;br /&gt;
			opts[1] = val&lt;br /&gt;
			ret[nss + 1] = ccs&lt;br /&gt;
			ret[nss + 2] = ctx.frame:expandTemplate(model)&lt;br /&gt;
			nss = nss + 2&lt;br /&gt;
		end&lt;br /&gt;
	)&lt;br /&gt;
	if nss &amp;gt; 0 then&lt;br /&gt;
		if nss &amp;gt; 2 and ctx.lastsep ~= nil then&lt;br /&gt;
			ret[nss - 1] = ctx.lastsep&lt;br /&gt;
		end&lt;br /&gt;
		ret[1] = ctx.header or &#039;&#039;&lt;br /&gt;
		if ctx.footer ~= nil then ret[nss + 1] = ctx.footer end&lt;br /&gt;
		ctx.text = table.concat(ret)&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	ctx.text = ctx.ifngiven or &#039;&#039;&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|invoke_for_each_value|module name|[append 1]|[append&lt;br /&gt;
--            2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param&lt;br /&gt;
--            n=value n]|[...]&lt;br /&gt;
library.invoke_for_each_value = function (ctx)&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local mname&lt;br /&gt;
	local fname&lt;br /&gt;
	if opts[1] ~= nil then mname = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if mname == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘invoke_for_each_value’: No module name was provided&#039;, 0) end&lt;br /&gt;
	if opts[2] ~= nil then fname = opts[2]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if fname == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘invoke_for_each_value’: No function name was provided&#039;, 0) end&lt;br /&gt;
	local model = { title = &#039;Module:&#039; .. mname, args = opts }&lt;br /&gt;
	local mfunc = require(model.title)[fname]&lt;br /&gt;
	local ccs = ctx.itersep or &#039;&#039;&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local nss = 0&lt;br /&gt;
	remove_numeric_keys(opts, 1, 1)&lt;br /&gt;
	flush_params(&lt;br /&gt;
		ctx,&lt;br /&gt;
		function (key, val)&lt;br /&gt;
			opts[1] = val&lt;br /&gt;
			ret[nss + 1] = ccs&lt;br /&gt;
			ret[nss + 2] = mfunc(ctx.frame:newChild(model))&lt;br /&gt;
			nss = nss + 2&lt;br /&gt;
		end&lt;br /&gt;
	)&lt;br /&gt;
	if nss &amp;gt; 0 then&lt;br /&gt;
		if nss &amp;gt; 2 and ctx.lastsep ~= nil then&lt;br /&gt;
			ret[nss - 1] = ctx.lastsep&lt;br /&gt;
		end&lt;br /&gt;
		ret[1] = ctx.header or &#039;&#039;&lt;br /&gt;
		if ctx.footer ~= nil then ret[nss + 1] = ctx.footer end&lt;br /&gt;
		ctx.text = table.concat(ret)&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	ctx.text = ctx.ifngiven or &#039;&#039;&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|magic_for_each_value|parser function|[append 1]&lt;br /&gt;
--            |[append 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named&lt;br /&gt;
--            param n=value n]|[...]&lt;br /&gt;
library.magic_for_each_value = function (ctx)&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local magic&lt;br /&gt;
	if opts[1] ~= nil then magic = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if magic == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘magic_for_each_value’: No parser function was provided&#039;, 0) end&lt;br /&gt;
	local ccs = ctx.itersep or &#039;&#039;&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local nss = 0&lt;br /&gt;
	flush_params(&lt;br /&gt;
		ctx,&lt;br /&gt;
		function (key, val)&lt;br /&gt;
			opts[1] = val&lt;br /&gt;
			ret[nss + 1] = ccs&lt;br /&gt;
			ret[nss + 2] = ctx.frame:callParserFunction(magic, opts)&lt;br /&gt;
			nss = nss + 2&lt;br /&gt;
		end&lt;br /&gt;
	)&lt;br /&gt;
	if nss &amp;gt; 0 then&lt;br /&gt;
		if nss &amp;gt; 2 and ctx.lastsep ~= nil then&lt;br /&gt;
			ret[nss - 1] = ctx.lastsep&lt;br /&gt;
		end&lt;br /&gt;
		ret[1] = ctx.header or &#039;&#039;&lt;br /&gt;
		if ctx.footer ~= nil then ret[nss + 1] = ctx.footer end&lt;br /&gt;
		ctx.text = table.concat(ret)&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	ctx.text = ctx.ifngiven or &#039;&#039;&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|call_for_each_group|template name|[append 1]|[append&lt;br /&gt;
--            2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param&lt;br /&gt;
--            n=value n]|[...]&lt;br /&gt;
library.call_for_each_group = function (ctx)&lt;br /&gt;
	-- NOTE: `ctx.pipe` and `ctx.params` might be the original metatables!&lt;br /&gt;
	local opts = ctx.pipe&lt;br /&gt;
	local tmp&lt;br /&gt;
	if opts[1] ~= nil then tmp = opts[1]:match&#039;^%s*(.*%S)&#039; end&lt;br /&gt;
	if tmp == nil then error(modulename ..&lt;br /&gt;
		&#039;, ‘call_for_each_group’: No template name was provided&#039;, 0) end&lt;br /&gt;
	local model = { title = tmp }&lt;br /&gt;
	local ccs = ctx.itersep or &#039;&#039;&lt;br /&gt;
	local nss = 0&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	opts = {}&lt;br /&gt;
	for key, val in pairs(ctx.pipe) do&lt;br /&gt;
		if type(key) == &#039;number&#039; then opts[key - 1] = val&lt;br /&gt;
		else opts[key] = val end&lt;br /&gt;
	end&lt;br /&gt;
	ctx.pipe = opts&lt;br /&gt;
	ctx.params = make_groups(ctx.params)&lt;br /&gt;
	flush_params(&lt;br /&gt;
		ctx,&lt;br /&gt;
		function (gid, group)&lt;br /&gt;
			for key, val in pairs(opts) do group[key] = val end&lt;br /&gt;
			group[0] = gid&lt;br /&gt;
			model.args = group&lt;br /&gt;
			ret[nss + 1] = ccs&lt;br /&gt;
			ret[nss + 2] = ctx.frame:expandTemplate(model)&lt;br /&gt;
			nss = nss + 2&lt;br /&gt;
		end&lt;br /&gt;
	)&lt;br /&gt;
	if nss &amp;gt; 0 then&lt;br /&gt;
		if nss &amp;gt; 2 and ctx.lastsep ~= nil then&lt;br /&gt;
			ret[nss - 1] = ctx.lastsep&lt;br /&gt;
		end&lt;br /&gt;
		ret[1] = ctx.header or &#039;&#039;&lt;br /&gt;
		if ctx.footer ~= nil then ret[nss + 1] = ctx.footer end&lt;br /&gt;
		ctx.text = table.concat(ret)&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	ctx.text = ctx.ifngiven or &#039;&#039;&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	---                                        ---&lt;br /&gt;
	---     PUBLIC ENVIRONMENT                 ---&lt;br /&gt;
	---    ________________________________    ---&lt;br /&gt;
	---                                        ---&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	--[[ First-position-only modifiers ]]--&lt;br /&gt;
	---------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|new|pipe to&lt;br /&gt;
static_iface.new = function (frame)&lt;br /&gt;
	local ctx = context_new(frame:getParent())&lt;br /&gt;
	ctx.pipe = copy_or_ref_table(frame.args, false)&lt;br /&gt;
	ctx.params = {}&lt;br /&gt;
	main_loop(ctx, context_iterate(ctx, 1))&lt;br /&gt;
	return ctx.text&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	--[[ First-position-only functions ]]--&lt;br /&gt;
	---------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Syntax:  #invoke:params|self&lt;br /&gt;
static_iface.self = function (frame)&lt;br /&gt;
	return frame:getParent():getTitle()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	--[[ Public metatable of functions ]]--&lt;br /&gt;
	---------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return setmetatable({}, {&lt;br /&gt;
	__index = function (_, query)&lt;br /&gt;
		local fname = query:match&#039;^%s*(.*%S)&#039;&lt;br /&gt;
		if fname == nil then error(modulename ..&lt;br /&gt;
			&#039;: You must specify a function to call&#039;, 0) end&lt;br /&gt;
		local func = static_iface[fname]&lt;br /&gt;
		if func ~= nil then return func end&lt;br /&gt;
		func = library[fname]&lt;br /&gt;
		if func == nil then error(modulename ..&lt;br /&gt;
			&#039;: The function ‘&#039; .. fname .. &#039;’ does not exist&#039;, 0) end&lt;br /&gt;
		return function (frame)&lt;br /&gt;
			local ctx = context_new(frame:getParent())&lt;br /&gt;
			ctx.pipe = copy_or_ref_table(frame.args, refpipe[fname])&lt;br /&gt;
			ctx.params = copy_or_ref_table(ctx.oparams, refparams[fname])&lt;br /&gt;
			main_loop(ctx, func)&lt;br /&gt;
			return ctx.text&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
})&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Template:Code/doc&amp;diff=6504</id>
		<title>Template:Code/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Template:Code/doc&amp;diff=6504"/>
		<updated>2025-07-31T19:22:23Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;{{Documentation subpage|Template documnetation subpages}}  ==Usage== Wraps a short span of text in &amp;lt;code&amp;gt;&amp;lt;syntaxhighlight&amp;gt;...&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/code&amp;gt; tags, see mw:Extension:SyntaxHighlight. This template should only be used for short samples; longer content should use &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;syntaxhighlight&amp;gt;&amp;lt;/code&amp;gt;. See Help:Wiki markup for an explanation of what the various tags do.  If the content includes an equals sign (=), yo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Documentation subpage|Template documnetation subpages}}&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
Wraps a short span of text in &amp;lt;code&amp;gt;&amp;lt;syntaxhighlight&amp;gt;...&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/code&amp;gt; tags, see [[mw:Extension:SyntaxHighlight]]. This template should only be used for short samples; longer content should use &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;syntaxhighlight&amp;gt;&amp;lt;/code&amp;gt;. See [[wikipedia:Help:Wiki markup|Help:Wiki markup]] for an explanation of what the various tags do.&lt;br /&gt;
&lt;br /&gt;
If the content includes an equals sign (=), you must specify the parameter explicitly: {{tji|code|2=1:int i = 0;}}.&lt;br /&gt;
&lt;br /&gt;
The template uses the {{tag|syntaxhighlight|o}} tag with the attribute &amp;lt;code&amp;gt;inline=1&amp;lt;/code&amp;gt;. This works like the combination of the {{tag|code|o}} and {{tag|nowiki|o}} tags,  applied to the expanded wikitext. For example, {{tji|code|&amp;lt;nowiki&amp;gt;some &#039;&#039;&#039;wiki&#039;&#039;&#039; text&amp;lt;/nowiki&amp;gt;}} will &#039;&#039;&#039;&#039;&#039;not&#039;&#039;&#039;&#039;&#039; render the word &amp;quot;wiki&amp;quot; in bold, and will render the tripled-single-quotes:&lt;br /&gt;
&lt;br /&gt;
:{{code|some &#039;&#039;&#039;wiki&#039;&#039;&#039; text}}&lt;br /&gt;
&lt;br /&gt;
If the above example is declared as wikitext (via {{tji|code|&amp;lt;nowiki&amp;gt;some &#039;&#039;&#039;wiki&#039;&#039;&#039; text&amp;lt;/nowiki&amp;gt;|lang:wikitext}}, the output is rendered as follows:&lt;br /&gt;
&lt;br /&gt;
:{{code|some &#039;&#039;&#039;wiki&#039;&#039;&#039; text|lang=wikitext}}&lt;br /&gt;
&lt;br /&gt;
However, {{tji|code|&amp;lt;nowiki&amp;gt;a {{template}} call&amp;lt;/nowiki&amp;gt;|lang:wikitext}} will still invoke the template:&lt;br /&gt;
&lt;br /&gt;
:{{code|a {{template}} call|lang=wikitext}}&lt;br /&gt;
&lt;br /&gt;
Use {{tag|nowiki}} around the template name to avoid this problem:&lt;br /&gt;
&lt;br /&gt;
:{{code|a &amp;lt;nowiki&amp;gt;{{template}}&amp;lt;/nowiki&amp;gt; call|lang=wikitext}}&lt;br /&gt;
&lt;br /&gt;
When used inline with regular text, {{tnull|code}} generally looks best and is easiest to read when it is explicitly spaced apart from the regular text:&lt;br /&gt;
:{{code|foo &amp;amp;nbsp;&amp;lt;nowiki&amp;gt;{{code|bar baz}}&amp;lt;/nowiki&amp;gt;&amp;amp;nbsp; quux.|lang=wikitext}}&lt;br /&gt;
is well spaced:&lt;br /&gt;
:foo &amp;amp;nbsp;{{code|bar baz}}&amp;amp;nbsp; quux.&lt;br /&gt;
versus:&lt;br /&gt;
:{{code|foo &amp;lt;nowiki&amp;gt;{{code|bar baz}}&amp;lt;/nowiki&amp;gt; quux.|wikitext}}&lt;br /&gt;
which is less visually clear:&lt;br /&gt;
:foo {{code|bar baz}} quux.&lt;br /&gt;
because &amp;quot;foo&amp;quot; and &amp;quot;{{code|bar}}&amp;quot; will seem more closely associated than &amp;quot;{{code|bar}}&amp;quot; and &amp;quot;{{code|baz}}&amp;quot;; the width of the space character in a monospaced font is almost always larger than in a proportional font.&lt;br /&gt;
&lt;br /&gt;
Use parameter {{{2}}} (unnamed, as {{para|2}}, or more explicitly as {{para|lang}}) to specify a language for [[mw:Extension:SyntaxHighlight]]. This option defaults to {{para|lang|text}}, i.e. no highlighting. Valid values include {{para|lang|wikitext}} for wikitext, {{para|lang|html}} for HTML, along with many other languages including {{code|php}}, {{code|perl}}, {{code|css}}, {{code|javascript}}, {{code|mysql}}. Attempting to use an invalid value for lang will cause the page to be added to [[:Category:Pages with syntax highlighting errors]], and no syntax highlighting will be present in the output. {{code|html4strict}} and {{code|html5}} used to be valid values - however, {{para|lang|html}} should be used instead.&lt;br /&gt;
&lt;br /&gt;
This template does not need to be [[Wikipedia:Template substitution|substituted]].&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&lt;br /&gt;
{{markup&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Lorem {{code|ipsum &#039;&#039;&#039;dolor&#039;&#039;&#039;}} sit amet&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|Lorem {{code|ipsum &#039;&#039;&#039;dolor&#039;&#039;&#039;}} sit amet&lt;br /&gt;
&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Lorem {{code|ipsum &#039;&#039;&#039;dolor&#039;&#039;&#039;|wikitext}} sit amet&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|Lorem {{code|ipsum &#039;&#039;&#039;dolor&#039;&#039;&#039;|wikitext}} sit amet&lt;br /&gt;
&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;The declaration {{code|lang=cpp |int foo(const std::string&amp;amp; bar, const std::vector&amp;lt;long double*&amp;gt;&amp;amp; baz);}} is the prototype for a function defined later.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|The declaration {{code|lang=cpp |int foo(const std::string&amp;amp; bar, const std::vector&amp;lt;long double*&amp;gt;&amp;amp; baz);}} is the prototype for a function defined later.&lt;br /&gt;
&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;If the code contains an [[equals sign]], such as {{code |lang=javascript |code=var img = document.getElementsByTagName(&amp;quot;img&amp;quot;);}}, you must identify the first parameter explicitly as {{{1}}} or {{{code}}}; see also [[:bugzilla:5138]].&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|If the code contains an [[equals sign]], such as {{code |lang=javascript |code=var img = document.getElementsByTagName(&amp;quot;img&amp;quot;);}}, you must identify the first parameter explicitly as {{{1}}} or {{{code}}}; see also [[:bugzilla:5138]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Included templates===&lt;br /&gt;
Embedded templates do not function as expected inside {{tl|code}}; for longer, free-form blocks of code, which can contain templates such as {{tl|var}} and {{tl|samp}}, use {{tag|code}} as a wrapper instead of this template.&lt;br /&gt;
&lt;br /&gt;
Templates used inside {{tl|code}} expose the rendered HTML— this can be useful. For example:&lt;br /&gt;
&amp;lt;div style=&amp;quot;overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
{{markup&lt;br /&gt;
|1=&amp;lt;nowiki&amp;gt;{{code|&lt;br /&gt;
{{cite web |title=Title |url=http://example.org}}&lt;br /&gt;
|lang=html&lt;br /&gt;
}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|2={{code|&lt;br /&gt;
{{cite web |title=Title |url=http://example.org}}&lt;br /&gt;
|lang=html&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
The above example shows the HTML rendered by the citation template, including the hidden metadata.&lt;br /&gt;
&lt;br /&gt;
== Expensive Parser Function warning ==&lt;br /&gt;
This template internally uses [[mw:Extension:SyntaxHighlight]], which is considered an &#039;expensive parser function&#039; (see [[WP:EXPENSIVE]]). If used on a page which uses more than 500 expensive parser functions, the output of subsequent uses of this template will be presented using {{tag|code}} formatting (without any syntax highlighting) instead.&lt;br /&gt;
&lt;br /&gt;
== TemplateData ==&lt;br /&gt;
{{Format TemplateData|&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;An inline source code string.&amp;quot;,&lt;br /&gt;
	&amp;quot;format&amp;quot;: &amp;quot;inline&amp;quot;,&lt;br /&gt;
	&amp;quot;params&amp;quot;: {&lt;br /&gt;
		&amp;quot;1&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Code&amp;quot;,&lt;br /&gt;
			&amp;quot;aliases&amp;quot;: [&amp;quot;code&amp;quot;],&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;The code to display.&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;2&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Language&amp;quot;,&lt;br /&gt;
			&amp;quot;aliases&amp;quot;: [&amp;quot;lang&amp;quot;],&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;The programming language of the source code. List of valid values is at: [[mw:Extension:SyntaxHighlight#Supported_languages]]&amp;quot;,&lt;br /&gt;
			&amp;quot;default&amp;quot;: &amp;quot;text&amp;quot;,&lt;br /&gt;
			&amp;quot;suggested&amp;quot;: true,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;class&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Class&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;style&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;CSS Style&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* {{tl|mono}}, monospaced font only&lt;br /&gt;
* [[Help:Wiki markup]]&lt;br /&gt;
* Language-specific wrapper templates:&lt;br /&gt;
** {{tl|jscode}}, defaults to &#039;javascript&#039;&lt;br /&gt;
** {{tl|luacode}}, defaults to &#039;lua&#039; (for modules)&lt;br /&gt;
** {{tl|tlcode}}, defaults to &#039;wikitext&#039; (for templates)&lt;br /&gt;
&lt;br /&gt;
{{Semantic markup templates|show}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Programming typing-aid templates]]&lt;br /&gt;
[[Category:Semantic markup templates]]&lt;br /&gt;
[[Category:Wikipedia XHTML tag-replacing templates]]&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Template:Code&amp;diff=6503</id>
		<title>Template:Code</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Template:Code&amp;diff=6503"/>
		<updated>2025-07-31T19:14:10Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;{{#tag:syntaxhighlight|{{{code|{{{1}}}}}}|lang={{{lang|{{{2|text}}}}}}|class={{{class|}}}|style={{{style|}}}|inline=1}}&amp;lt;noinclude&amp;gt; {{documentation}} Category:Programming typing-aid templates Category:Semantic mark-up templates Category:Wiki XHTML tag-replacing templates Category:Templates imported from Wikipedia &amp;lt;/noinclude&amp;gt;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#tag:syntaxhighlight|{{{code|{{{1}}}}}}|lang={{{lang|{{{2|text}}}}}}|class={{{class|}}}|style={{{style|}}}|inline=1}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{documentation}}&lt;br /&gt;
[[Category:Programming typing-aid templates]] [[Category:Semantic mark-up templates]] [[Category:Wiki XHTML tag-replacing templates]]&lt;br /&gt;
[[Category:Templates imported from Wikipedia]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:TableTools/doc&amp;diff=6502</id>
		<title>Module:TableTools/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:TableTools/doc&amp;diff=6502"/>
		<updated>2025-07-31T19:08:13Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Documentation subpage|cat=Module documentation subpages}}&lt;br /&gt;
{{lua|Module:Exponential search|noprotcat=yes}}&lt;br /&gt;
This module includes a number of functions for dealing with Lua tables. It is a meta-module, meant to be called from other Lua modules, and should not be called directly from #invoke.&lt;br /&gt;
&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
&lt;br /&gt;
To use any of the functions, first you must load the module.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local TableTools = require(&#039;Module:TableTools&#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== isPositiveInteger ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.isPositiveInteger(value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;&#039;&#039;value&#039;&#039;&amp;lt;/code&amp;gt; is a positive integer, and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; if not. Although it doesn&#039;t operate on tables, it is included here as it is useful for determining whether a given table key is in the array part or the hash part of a table.&lt;br /&gt;
&lt;br /&gt;
== isNan ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.isNan(value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;&#039;&#039;value&#039;&#039;&amp;lt;/code&amp;gt; is a [[NaN]] value, and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; if not. Although it doesn&#039;t operate on tables, it is included here as it is useful for determining whether a value can be a valid table key. (Lua will generate an error if a NaN value is used as a table key.)&lt;br /&gt;
&lt;br /&gt;
== shallowClone ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.shallowClone(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns a clone of a table. The value returned is a new table, but all subtables and functions are shared. Metamethods are respected, but the returned table will have no metatable of its own. If you want to make a new table with no shared subtables and with metatables transferred, you can use &amp;lt;code&amp;gt;[[mw:Extension:Scribunto/Lua reference manual#mw.clone|mw.clone]]&amp;lt;/code&amp;gt; instead. If you want to make a new table with no shared subtables and without metatables transferred, use &amp;lt;code&amp;gt;[[#deepCopy|deepCopy]]&amp;lt;/code&amp;gt; with the &amp;lt;code&amp;gt;noMetatable&amp;lt;/code&amp;gt; option.&lt;br /&gt;
&lt;br /&gt;
== removeDuplicates ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.removeDuplicates(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes duplicate values from an array. This function is only designed to work with standard arrays: keys that are not positive integers are ignored, as are all values after the first &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; value. (For arrays containing &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; values, you can use &amp;lt;code&amp;gt;[[#compressSparseArray|compressSparseArray]]&amp;lt;/code&amp;gt; first.) The function tries to preserve the order of the array: the earliest non-unique value is kept, and all subsequent duplicate values are removed. For example, for the table {{code|code={5, 4, 4, 3, 4, 2, 2, 1}|lang=lua}} &amp;lt;code&amp;gt;removeDuplicates&amp;lt;/code&amp;gt; will return {{code|code={5, 4, 3, 2, 1}|lang=lua}}.&lt;br /&gt;
&lt;br /&gt;
== numKeys ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.numKeys(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes a table &amp;lt;code&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/code&amp;gt; and returns an array containing the numbers of any positive integer keys that have non-nil values, sorted in numerical order. For example, for the table {{code|code={&#039;foo&#039;, nil, &#039;bar&#039;, &#039;baz&#039;, a = &#039;b&#039;}|lang=lua}}, &amp;lt;code&amp;gt;numKeys&amp;lt;/code&amp;gt; will return {{code|code={1, 3, 4}|lang=lua}}.&lt;br /&gt;
&lt;br /&gt;
== affixNums ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.affixNums(t, prefix, suffix)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes a table &amp;lt;code&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/code&amp;gt; and returns an array containing the numbers of keys with the optional prefix &amp;lt;code&amp;gt;&#039;&#039;prefix&#039;&#039;&amp;lt;/code&amp;gt; and the optional suffix &amp;lt;code&amp;gt;&#039;&#039;suffix&#039;&#039;&amp;lt;/code&amp;gt;. For example, for the table {{code|code={a1 = &#039;foo&#039;, a3 = &#039;bar&#039;, a6 = &#039;baz&#039;}|lang=lua}} and the prefix &amp;lt;code&amp;gt;&#039;a&#039;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;affixNums&amp;lt;/code&amp;gt; will return {{code|code={1, 3, 6}|lang=lua}}. All characters in &amp;lt;code&amp;gt;&#039;&#039;prefix&#039;&#039;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&#039;&#039;suffix&#039;&#039;&amp;lt;/code&amp;gt; are interpreted literally.&lt;br /&gt;
&lt;br /&gt;
See {{mfl|params|call_for_each_group}} and {{mfl|params|grouping_by_calling}} for doing something similar from a wiki template.&lt;br /&gt;
&lt;br /&gt;
== numData ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.numData(t, compress)&lt;br /&gt;
&amp;lt;/pre&lt;br /&gt;
&lt;br /&gt;
Given a table with keys like &amp;lt;code&amp;gt;&amp;quot;foo1&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;bar1&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;foo2&amp;quot;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;&amp;quot;baz2&amp;quot;&amp;lt;/code&amp;gt;, returns a table of subtables in the format {{code|code={ [1] = {foo = &#039;text&#039;, bar = &#039;text&#039;}, [2] = {foo = &#039;text&#039;, baz = &#039;text&#039;} }|lang=lua}}. Keys that don&#039;t end with an integer are stored in a subtable named &amp;lt;code&amp;gt;&amp;quot;other&amp;quot;&amp;lt;/code&amp;gt;. The compress option compresses the table so that it can be iterated over with &amp;lt;code&amp;gt;ipairs&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== compressSparseArray ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.compressSparseArray(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes an array &amp;lt;code&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/code&amp;gt; with one or more nil values, and removes the nil values while preserving the order, so that the array can be safely traversed with &amp;lt;code&amp;gt;ipairs&amp;lt;/code&amp;gt;. Any keys that are not positive integers are removed. For example, for the table {{code|code={1, nil, foo = &#039;bar&#039;, 3, 2}|lang=lua}}, &amp;lt;code&amp;gt;compressSparseArray&amp;lt;/code&amp;gt; will return {{code|code={1, 3, 2}|lang=lua}}.&lt;br /&gt;
&lt;br /&gt;
See {{mfl|params|squeezing}} for doing something similar from a wiki template.&lt;br /&gt;
&lt;br /&gt;
== sparseIpairs ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.sparseIpairs(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is an iterator function for traversing a sparse array &amp;lt;code&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/code&amp;gt;. It is similar to &amp;lt;code&amp;gt;[[mw:Extension:Scribunto/Lua reference manual#ipairs|ipairs]]&amp;lt;/code&amp;gt;, but will continue to iterate until the highest numerical key, whereas &amp;lt;code&amp;gt;ipairs&amp;lt;/code&amp;gt; may stop after the first &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; value. Any keys that are not positive integers are ignored.&lt;br /&gt;
&lt;br /&gt;
Usually &amp;lt;code&amp;gt;sparseIpairs&amp;lt;/code&amp;gt; is used in a generic &amp;lt;code&amp;gt;for&amp;lt;/code&amp;gt; loop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
for i, v in TableTools.sparseIpairs(t) do&lt;br /&gt;
   -- code block&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;sparseIpairs&amp;lt;/code&amp;gt; uses the &amp;lt;code&amp;gt;[[mw:Extension:Scribunto/Lua reference manual#pairs|pairs]]&amp;lt;/code&amp;gt; function in its implementation. Although some table keys appear to be ignored, all table keys are accessed when it is run.&lt;br /&gt;
&lt;br /&gt;
== size ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.size(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finds the size of a key/value pair table ([[associative array]]). For example, for {{code|code={foo = &#039;foo&#039;, bar = &#039;bar&#039;}|lang=lua}}, &amp;lt;code&amp;gt;size&amp;lt;/code&amp;gt; will return &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;. The function will also work on arrays, but for arrays it is more efficient to use the &amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; operator. Note that to find the size, this function uses the &amp;lt;code&amp;gt;[[mw:Extension:Scribunto/Lua reference manual#pairs|pairs]]&amp;lt;/code&amp;gt; function to iterate through all of the keys.&lt;br /&gt;
&lt;br /&gt;
== keysToList ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
TableTools.keysToList(t, keySort, checked)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns a list of the keys in a table, sorted using either a default comparison function or a custom &amp;lt;code&amp;gt;&#039;&#039;keySort&#039;&#039;&amp;lt;/code&amp;gt; function, which follows the same rules as the &amp;lt;code&amp;gt;comp&amp;lt;/code&amp;gt; function supplied to &amp;lt;code&amp;gt;[[mw:Extension:Scribunto/Lua reference manual#table.sort|table.sort]]&amp;lt;/code&amp;gt;. If &amp;lt;code&amp;gt;&#039;&#039;keySort&#039;&#039;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, no sorting is done. Set &amp;lt;code&amp;gt;&#039;&#039;checked&#039;&#039;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; to skip the internal type checking.&lt;br /&gt;
&lt;br /&gt;
== sortedPairs ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.sortedPairs(t, keySort)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Iterates through a table, with the keys sorted using the &amp;lt;code&amp;gt;keysToList&amp;lt;/code&amp;gt; function. If there are only numerical keys, &amp;lt;code&amp;gt;sparseIpairs&amp;lt;/code&amp;gt; is probably more efficient.&lt;br /&gt;
&lt;br /&gt;
== isArray ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.isArray(value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;&#039;&#039;value&#039;&#039;&amp;lt;/code&amp;gt; is a table and all keys are consecutive integers starting at 1.&lt;br /&gt;
&lt;br /&gt;
== isArrayLike ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.isArrayLike(value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;&#039;&#039;value&#039;&#039;&amp;lt;/code&amp;gt; is iterable and all keys are consecutive integers starting at 1.&lt;br /&gt;
&lt;br /&gt;
== invert ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.invert(arr)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Transposes the keys and values in an array. For example, {{code|invert{ &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot; }|lua}} yields {{code|code={ a=1, b=2, c=3 }|lang=lua}}.&lt;br /&gt;
&lt;br /&gt;
== listToSet ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.listToSet(arr)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a set from the array part of the table &amp;lt;code&amp;gt;&#039;&#039;arr&#039;&#039;&amp;lt;/code&amp;gt;. Indexing the set by any of the values of the array returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;. For example, {{code|listToSet{ &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot; }|lua}} yields {{code|code={ a=true, b=true, c=true }|lang=lua}}.&lt;br /&gt;
&lt;br /&gt;
== deepCopy ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.deepCopy(orig, noMetatable, alreadySeen)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a copy of the table &amp;lt;code&amp;gt;&#039;&#039;orig&#039;&#039;&amp;lt;/code&amp;gt;. As with &amp;lt;code&amp;gt;mw.clone&amp;lt;/code&amp;gt;, all values that are not functions are duplicated and the identity of tables is preserved. If &amp;lt;code&amp;gt;&#039;&#039;noMetatable&#039;&#039;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, then the metatable (if any) is not copied. Can copy tables loaded with &amp;lt;code&amp;gt;mw.loadData&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Similar to &amp;lt;code&amp;gt;mw.clone&amp;lt;/code&amp;gt;, but &amp;lt;code&amp;gt;mw.clone&amp;lt;/code&amp;gt; cannot copy tables loaded with &amp;lt;code&amp;gt;mw.loadData&amp;lt;/code&amp;gt; and does not allow metatables &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; to be copied.&lt;br /&gt;
&lt;br /&gt;
== sparseConcat ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.sparseConcat(t, sep, i, j)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Concatenates all values in the table that are indexed by a positive integer, in order. For example, {{code|sparseConcat{ &amp;quot;a&amp;quot;, nil, &amp;quot;c&amp;quot;, &amp;quot;d&amp;quot; }|lua}} yields {{code|&amp;quot;acd&amp;quot;|lua}} and {{code|sparseConcat{ nil, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;, &amp;quot;d&amp;quot; }|lua}} yields {{code|&amp;quot;bcd&amp;quot;|lua}}.&lt;br /&gt;
&lt;br /&gt;
== length ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.length(t, prefix)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finds the length of an array or of a quasi-array with keys with an optional &amp;lt;code&amp;gt;&#039;&#039;prefix&#039;&#039;&amp;lt;/code&amp;gt; such as &amp;quot;data1&amp;quot;, &amp;quot;data2&amp;quot;, etc. It uses an [[exponential search]] algorithm to find the length, so as to use as few table lookups as possible.&lt;br /&gt;
&lt;br /&gt;
This algorithm is useful for arrays that use metatables (e.g. [[mw:Extension:Scribunto/Lua reference manual#frame.args|frame.args]]) and for quasi-arrays. For normal arrays, just use the [[mw:Extension:Scribunto/Lua reference manual#Length operator|# operator]], as it is implemented in [[C (programming language)|C]] and will be quicker.&lt;br /&gt;
&lt;br /&gt;
== inArray ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;TableTools.inArray(array, searchElement)&lt;br /&gt;
TableTools.inArray(array, searchElement, fromIndex)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;&#039;&#039;searchElement&#039;&#039;&amp;lt;/code&amp;gt; is a member of the array &amp;lt;code&amp;gt;&#039;&#039;array&#039;&#039;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; otherwise. Equivalent to the javascript [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes Array.prototype.includes()] function, except fromIndex is 1-indexed instead of zero-indexed.&lt;br /&gt;
&lt;br /&gt;
=== fromIndex ===&lt;br /&gt;
&amp;lt;code&amp;gt;fromIndex&amp;lt;/code&amp;gt; is the optional 1-based index at which to start searching. If &amp;lt;code&amp;gt;fromIndex&amp;lt;/code&amp;gt; is not present, all values in the array will be searched and the array will be treated as a table/[[associative array]] (it will be iterated over using &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; inline&amp;gt;pairs()&amp;lt;/syntaxhighlight&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;fromIndex&amp;lt;/code&amp;gt; is present and an integer, the array is assumed to be a conventional array/sequence/list (indexed with consecutive integer keys starting at &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, and interated over using &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; inline&amp;gt;ipairs()&amp;lt;/syntaxhighlight&amp;gt;). Only the values whose index is &amp;lt;code&amp;gt;fromIndex&amp;lt;/code&amp;gt; or higher will be searched.&lt;br /&gt;
&lt;br /&gt;
In the following examples, &amp;lt;code&amp;gt;#array&amp;lt;/code&amp;gt; represents the length of the integer-keyed portion of the array.&lt;br /&gt;
&lt;br /&gt;
* If &amp;lt;code&amp;gt;fromIndex &amp;lt; 0&amp;lt;/code&amp;gt; it will count back from the end of the array, e.g. a value of &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; will only search the last integer-keyed element in the array. If &amp;lt;code&amp;gt;fromIndex &amp;lt;= (-1 * #array)&amp;lt;/code&amp;gt;, the entire integer-keyed portion of the array will be searched.&lt;br /&gt;
* If &amp;lt;code&amp;gt;fromIndex = 0&amp;lt;/code&amp;gt; it will be treated as a &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; and the entire integer-keyed portion of the array will be searched.&lt;br /&gt;
* If &amp;lt;code&amp;gt;fromIndex &amp;gt; #array&amp;lt;/code&amp;gt;, the array is not searched and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; is returned.&lt;br /&gt;
&lt;br /&gt;
== merge ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.merge(...)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Given the arrays, returns an array containing the elements of each input array in sequence.&lt;br /&gt;
&lt;br /&gt;
== extend ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.extend(arr1, arr2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Extends the first array in place by appending all elements from the second array.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* {{ml|params|}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- MODULE CATEGORY --&amp;gt;&lt;br /&gt;
[[Category:Lua metamodules|TableTools]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;!-- MODULE DOCUMENTATION CATEGORIES --&amp;gt;&lt;br /&gt;
[[Category:Module documentation subpages imported from Wikipedia]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:TableTools/doc&amp;diff=6501</id>
		<title>Module:TableTools/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:TableTools/doc&amp;diff=6501"/>
		<updated>2025-07-31T19:05:21Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lua|Module:Exponential search|noprotcat=yes}}&lt;br /&gt;
This module includes a number of functions for dealing with Lua tables. It is a meta-module, meant to be called from other Lua modules, and should not be called directly from #invoke.&lt;br /&gt;
&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
&lt;br /&gt;
To use any of the functions, first you must load the module.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local TableTools = require(&#039;Module:TableTools&#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== isPositiveInteger ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.isPositiveInteger(value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;&#039;&#039;value&#039;&#039;&amp;lt;/code&amp;gt; is a positive integer, and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; if not. Although it doesn&#039;t operate on tables, it is included here as it is useful for determining whether a given table key is in the array part or the hash part of a table.&lt;br /&gt;
&lt;br /&gt;
== isNan ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.isNan(value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;&#039;&#039;value&#039;&#039;&amp;lt;/code&amp;gt; is a [[NaN]] value, and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; if not. Although it doesn&#039;t operate on tables, it is included here as it is useful for determining whether a value can be a valid table key. (Lua will generate an error if a NaN value is used as a table key.)&lt;br /&gt;
&lt;br /&gt;
== shallowClone ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.shallowClone(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns a clone of a table. The value returned is a new table, but all subtables and functions are shared. Metamethods are respected, but the returned table will have no metatable of its own. If you want to make a new table with no shared subtables and with metatables transferred, you can use &amp;lt;code&amp;gt;[[mw:Extension:Scribunto/Lua reference manual#mw.clone|mw.clone]]&amp;lt;/code&amp;gt; instead. If you want to make a new table with no shared subtables and without metatables transferred, use &amp;lt;code&amp;gt;[[#deepCopy|deepCopy]]&amp;lt;/code&amp;gt; with the &amp;lt;code&amp;gt;noMetatable&amp;lt;/code&amp;gt; option.&lt;br /&gt;
&lt;br /&gt;
== removeDuplicates ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.removeDuplicates(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes duplicate values from an array. This function is only designed to work with standard arrays: keys that are not positive integers are ignored, as are all values after the first &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; value. (For arrays containing &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; values, you can use &amp;lt;code&amp;gt;[[#compressSparseArray|compressSparseArray]]&amp;lt;/code&amp;gt; first.) The function tries to preserve the order of the array: the earliest non-unique value is kept, and all subsequent duplicate values are removed. For example, for the table {{code|code={5, 4, 4, 3, 4, 2, 2, 1}|lang=lua}} &amp;lt;code&amp;gt;removeDuplicates&amp;lt;/code&amp;gt; will return {{code|code={5, 4, 3, 2, 1}|lang=lua}}.&lt;br /&gt;
&lt;br /&gt;
== numKeys ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.numKeys(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes a table &amp;lt;code&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/code&amp;gt; and returns an array containing the numbers of any positive integer keys that have non-nil values, sorted in numerical order. For example, for the table {{code|code={&#039;foo&#039;, nil, &#039;bar&#039;, &#039;baz&#039;, a = &#039;b&#039;}|lang=lua}}, &amp;lt;code&amp;gt;numKeys&amp;lt;/code&amp;gt; will return {{code|code={1, 3, 4}|lang=lua}}.&lt;br /&gt;
&lt;br /&gt;
== affixNums ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.affixNums(t, prefix, suffix)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes a table &amp;lt;code&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/code&amp;gt; and returns an array containing the numbers of keys with the optional prefix &amp;lt;code&amp;gt;&#039;&#039;prefix&#039;&#039;&amp;lt;/code&amp;gt; and the optional suffix &amp;lt;code&amp;gt;&#039;&#039;suffix&#039;&#039;&amp;lt;/code&amp;gt;. For example, for the table {{code|code={a1 = &#039;foo&#039;, a3 = &#039;bar&#039;, a6 = &#039;baz&#039;}|lang=lua}} and the prefix &amp;lt;code&amp;gt;&#039;a&#039;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;affixNums&amp;lt;/code&amp;gt; will return {{code|code={1, 3, 6}|lang=lua}}. All characters in &amp;lt;code&amp;gt;&#039;&#039;prefix&#039;&#039;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&#039;&#039;suffix&#039;&#039;&amp;lt;/code&amp;gt; are interpreted literally.&lt;br /&gt;
&lt;br /&gt;
See {{mfl|params|call_for_each_group}} and {{mfl|params|grouping_by_calling}} for doing something similar from a wiki template.&lt;br /&gt;
&lt;br /&gt;
== numData ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.numData(t, compress)&lt;br /&gt;
&amp;lt;/pre&lt;br /&gt;
&lt;br /&gt;
Given a table with keys like &amp;lt;code&amp;gt;&amp;quot;foo1&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;bar1&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;foo2&amp;quot;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;&amp;quot;baz2&amp;quot;&amp;lt;/code&amp;gt;, returns a table of subtables in the format {{code|code={ [1] = {foo = &#039;text&#039;, bar = &#039;text&#039;}, [2] = {foo = &#039;text&#039;, baz = &#039;text&#039;} }|lang=lua}}. Keys that don&#039;t end with an integer are stored in a subtable named &amp;lt;code&amp;gt;&amp;quot;other&amp;quot;&amp;lt;/code&amp;gt;. The compress option compresses the table so that it can be iterated over with &amp;lt;code&amp;gt;ipairs&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== compressSparseArray ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.compressSparseArray(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes an array &amp;lt;code&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/code&amp;gt; with one or more nil values, and removes the nil values while preserving the order, so that the array can be safely traversed with &amp;lt;code&amp;gt;ipairs&amp;lt;/code&amp;gt;. Any keys that are not positive integers are removed. For example, for the table {{code|code={1, nil, foo = &#039;bar&#039;, 3, 2}|lang=lua}}, &amp;lt;code&amp;gt;compressSparseArray&amp;lt;/code&amp;gt; will return {{code|code={1, 3, 2}|lang=lua}}.&lt;br /&gt;
&lt;br /&gt;
See {{mfl|params|squeezing}} for doing something similar from a wiki template.&lt;br /&gt;
&lt;br /&gt;
== sparseIpairs ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.sparseIpairs(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is an iterator function for traversing a sparse array &amp;lt;code&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/code&amp;gt;. It is similar to &amp;lt;code&amp;gt;[[mw:Extension:Scribunto/Lua reference manual#ipairs|ipairs]]&amp;lt;/code&amp;gt;, but will continue to iterate until the highest numerical key, whereas &amp;lt;code&amp;gt;ipairs&amp;lt;/code&amp;gt; may stop after the first &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; value. Any keys that are not positive integers are ignored.&lt;br /&gt;
&lt;br /&gt;
Usually &amp;lt;code&amp;gt;sparseIpairs&amp;lt;/code&amp;gt; is used in a generic &amp;lt;code&amp;gt;for&amp;lt;/code&amp;gt; loop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
for i, v in TableTools.sparseIpairs(t) do&lt;br /&gt;
   -- code block&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;sparseIpairs&amp;lt;/code&amp;gt; uses the &amp;lt;code&amp;gt;[[mw:Extension:Scribunto/Lua reference manual#pairs|pairs]]&amp;lt;/code&amp;gt; function in its implementation. Although some table keys appear to be ignored, all table keys are accessed when it is run.&lt;br /&gt;
&lt;br /&gt;
== size ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.size(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finds the size of a key/value pair table ([[associative array]]). For example, for {{code|code={foo = &#039;foo&#039;, bar = &#039;bar&#039;}|lang=lua}}, &amp;lt;code&amp;gt;size&amp;lt;/code&amp;gt; will return &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;. The function will also work on arrays, but for arrays it is more efficient to use the &amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; operator. Note that to find the size, this function uses the &amp;lt;code&amp;gt;[[mw:Extension:Scribunto/Lua reference manual#pairs|pairs]]&amp;lt;/code&amp;gt; function to iterate through all of the keys.&lt;br /&gt;
&lt;br /&gt;
== keysToList ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
TableTools.keysToList(t, keySort, checked)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns a list of the keys in a table, sorted using either a default comparison function or a custom &amp;lt;code&amp;gt;&#039;&#039;keySort&#039;&#039;&amp;lt;/code&amp;gt; function, which follows the same rules as the &amp;lt;code&amp;gt;comp&amp;lt;/code&amp;gt; function supplied to &amp;lt;code&amp;gt;[[mw:Extension:Scribunto/Lua reference manual#table.sort|table.sort]]&amp;lt;/code&amp;gt;. If &amp;lt;code&amp;gt;&#039;&#039;keySort&#039;&#039;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, no sorting is done. Set &amp;lt;code&amp;gt;&#039;&#039;checked&#039;&#039;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; to skip the internal type checking.&lt;br /&gt;
&lt;br /&gt;
== sortedPairs ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.sortedPairs(t, keySort)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Iterates through a table, with the keys sorted using the &amp;lt;code&amp;gt;keysToList&amp;lt;/code&amp;gt; function. If there are only numerical keys, &amp;lt;code&amp;gt;sparseIpairs&amp;lt;/code&amp;gt; is probably more efficient.&lt;br /&gt;
&lt;br /&gt;
== isArray ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.isArray(value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;&#039;&#039;value&#039;&#039;&amp;lt;/code&amp;gt; is a table and all keys are consecutive integers starting at 1.&lt;br /&gt;
&lt;br /&gt;
== isArrayLike ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.isArrayLike(value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;&#039;&#039;value&#039;&#039;&amp;lt;/code&amp;gt; is iterable and all keys are consecutive integers starting at 1.&lt;br /&gt;
&lt;br /&gt;
== invert ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.invert(arr)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Transposes the keys and values in an array. For example, {{code|invert{ &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot; }|lua}} yields {{code|code={ a=1, b=2, c=3 }|lang=lua}}.&lt;br /&gt;
&lt;br /&gt;
== listToSet ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.listToSet(arr)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a set from the array part of the table &amp;lt;code&amp;gt;&#039;&#039;arr&#039;&#039;&amp;lt;/code&amp;gt;. Indexing the set by any of the values of the array returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;. For example, {{code|listToSet{ &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot; }|lua}} yields {{code|code={ a=true, b=true, c=true }|lang=lua}}.&lt;br /&gt;
&lt;br /&gt;
== deepCopy ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.deepCopy(orig, noMetatable, alreadySeen)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a copy of the table &amp;lt;code&amp;gt;&#039;&#039;orig&#039;&#039;&amp;lt;/code&amp;gt;. As with &amp;lt;code&amp;gt;mw.clone&amp;lt;/code&amp;gt;, all values that are not functions are duplicated and the identity of tables is preserved. If &amp;lt;code&amp;gt;&#039;&#039;noMetatable&#039;&#039;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, then the metatable (if any) is not copied. Can copy tables loaded with &amp;lt;code&amp;gt;mw.loadData&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Similar to &amp;lt;code&amp;gt;mw.clone&amp;lt;/code&amp;gt;, but &amp;lt;code&amp;gt;mw.clone&amp;lt;/code&amp;gt; cannot copy tables loaded with &amp;lt;code&amp;gt;mw.loadData&amp;lt;/code&amp;gt; and does not allow metatables &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; to be copied.&lt;br /&gt;
&lt;br /&gt;
== sparseConcat ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.sparseConcat(t, sep, i, j)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Concatenates all values in the table that are indexed by a positive integer, in order. For example, {{code|sparseConcat{ &amp;quot;a&amp;quot;, nil, &amp;quot;c&amp;quot;, &amp;quot;d&amp;quot; }|lua}} yields {{code|&amp;quot;acd&amp;quot;|lua}} and {{code|sparseConcat{ nil, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;, &amp;quot;d&amp;quot; }|lua}} yields {{code|&amp;quot;bcd&amp;quot;|lua}}.&lt;br /&gt;
&lt;br /&gt;
== length ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.length(t, prefix)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finds the length of an array or of a quasi-array with keys with an optional &amp;lt;code&amp;gt;&#039;&#039;prefix&#039;&#039;&amp;lt;/code&amp;gt; such as &amp;quot;data1&amp;quot;, &amp;quot;data2&amp;quot;, etc. It uses an [[exponential search]] algorithm to find the length, so as to use as few table lookups as possible.&lt;br /&gt;
&lt;br /&gt;
This algorithm is useful for arrays that use metatables (e.g. [[mw:Extension:Scribunto/Lua reference manual#frame.args|frame.args]]) and for quasi-arrays. For normal arrays, just use the [[mw:Extension:Scribunto/Lua reference manual#Length operator|# operator]], as it is implemented in [[C (programming language)|C]] and will be quicker.&lt;br /&gt;
&lt;br /&gt;
== inArray ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;TableTools.inArray(array, searchElement)&lt;br /&gt;
TableTools.inArray(array, searchElement, fromIndex)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;&#039;&#039;searchElement&#039;&#039;&amp;lt;/code&amp;gt; is a member of the array &amp;lt;code&amp;gt;&#039;&#039;array&#039;&#039;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; otherwise. Equivalent to the javascript [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes Array.prototype.includes()] function, except fromIndex is 1-indexed instead of zero-indexed.&lt;br /&gt;
&lt;br /&gt;
=== fromIndex ===&lt;br /&gt;
&amp;lt;code&amp;gt;fromIndex&amp;lt;/code&amp;gt; is the optional 1-based index at which to start searching. If &amp;lt;code&amp;gt;fromIndex&amp;lt;/code&amp;gt; is not present, all values in the array will be searched and the array will be treated as a table/[[associative array]] (it will be iterated over using &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; inline&amp;gt;pairs()&amp;lt;/syntaxhighlight&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;fromIndex&amp;lt;/code&amp;gt; is present and an integer, the array is assumed to be a conventional array/sequence/list (indexed with consecutive integer keys starting at &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, and interated over using &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; inline&amp;gt;ipairs()&amp;lt;/syntaxhighlight&amp;gt;). Only the values whose index is &amp;lt;code&amp;gt;fromIndex&amp;lt;/code&amp;gt; or higher will be searched.&lt;br /&gt;
&lt;br /&gt;
In the following examples, &amp;lt;code&amp;gt;#array&amp;lt;/code&amp;gt; represents the length of the integer-keyed portion of the array.&lt;br /&gt;
&lt;br /&gt;
* If &amp;lt;code&amp;gt;fromIndex &amp;lt; 0&amp;lt;/code&amp;gt; it will count back from the end of the array, e.g. a value of &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; will only search the last integer-keyed element in the array. If &amp;lt;code&amp;gt;fromIndex &amp;lt;= (-1 * #array)&amp;lt;/code&amp;gt;, the entire integer-keyed portion of the array will be searched.&lt;br /&gt;
* If &amp;lt;code&amp;gt;fromIndex = 0&amp;lt;/code&amp;gt; it will be treated as a &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; and the entire integer-keyed portion of the array will be searched.&lt;br /&gt;
* If &amp;lt;code&amp;gt;fromIndex &amp;gt; #array&amp;lt;/code&amp;gt;, the array is not searched and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; is returned.&lt;br /&gt;
&lt;br /&gt;
== merge ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.merge(...)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Given the arrays, returns an array containing the elements of each input array in sequence.&lt;br /&gt;
&lt;br /&gt;
== extend ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.extend(arr1, arr2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Extends the first array in place by appending all elements from the second array.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* {{ml|params|}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- MODULE CATEGORY --&amp;gt;&lt;br /&gt;
[[Category:Lua metamodules|TableTools]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;!-- MODULE DOCUMENTATION CATEGORIES --&amp;gt;&lt;br /&gt;
[[Category:Module documentation subpages]] [[Category:Module documentation subpages imported from Wikipedia]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Module:TableTools/doc&amp;diff=6500</id>
		<title>Module:TableTools/doc</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Module:TableTools/doc&amp;diff=6500"/>
		<updated>2025-07-31T19:03:26Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lua|Module:Exponential search|noprotcat=yes}}&lt;br /&gt;
This module includes a number of functions for dealing with Lua tables. It is a meta-module, meant to be called from other Lua modules, and should not be called directly from #invoke.&lt;br /&gt;
&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
&lt;br /&gt;
To use any of the functions, first you must load the module.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local TableTools = require(&#039;Module:TableTools&#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== isPositiveInteger ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.isPositiveInteger(value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;&#039;&#039;value&#039;&#039;&amp;lt;/code&amp;gt; is a positive integer, and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; if not. Although it doesn&#039;t operate on tables, it is included here as it is useful for determining whether a given table key is in the array part or the hash part of a table.&lt;br /&gt;
&lt;br /&gt;
== isNan ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.isNan(value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;&#039;&#039;value&#039;&#039;&amp;lt;/code&amp;gt; is a [[NaN]] value, and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; if not. Although it doesn&#039;t operate on tables, it is included here as it is useful for determining whether a value can be a valid table key. (Lua will generate an error if a NaN value is used as a table key.)&lt;br /&gt;
&lt;br /&gt;
== shallowClone ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.shallowClone(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns a clone of a table. The value returned is a new table, but all subtables and functions are shared. Metamethods are respected, but the returned table will have no metatable of its own. If you want to make a new table with no shared subtables and with metatables transferred, you can use &amp;lt;code&amp;gt;[[mw:Extension:Scribunto/Lua reference manual#mw.clone|mw.clone]]&amp;lt;/code&amp;gt; instead. If you want to make a new table with no shared subtables and without metatables transferred, use &amp;lt;code&amp;gt;[[#deepCopy|deepCopy]]&amp;lt;/code&amp;gt; with the &amp;lt;code&amp;gt;noMetatable&amp;lt;/code&amp;gt; option.&lt;br /&gt;
&lt;br /&gt;
== removeDuplicates ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.removeDuplicates(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes duplicate values from an array. This function is only designed to work with standard arrays: keys that are not positive integers are ignored, as are all values after the first &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; value. (For arrays containing &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; values, you can use &amp;lt;code&amp;gt;[[#compressSparseArray|compressSparseArray]]&amp;lt;/code&amp;gt; first.) The function tries to preserve the order of the array: the earliest non-unique value is kept, and all subsequent duplicate values are removed. For example, for the table {{code|code={5, 4, 4, 3, 4, 2, 2, 1}|lang=lua}} &amp;lt;code&amp;gt;removeDuplicates&amp;lt;/code&amp;gt; will return {{code|code={5, 4, 3, 2, 1}|lang=lua}}.&lt;br /&gt;
&lt;br /&gt;
== numKeys ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.numKeys(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes a table &amp;lt;code&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/code&amp;gt; and returns an array containing the numbers of any positive integer keys that have non-nil values, sorted in numerical order. For example, for the table {{code|code={&#039;foo&#039;, nil, &#039;bar&#039;, &#039;baz&#039;, a = &#039;b&#039;}|lang=lua}}, &amp;lt;code&amp;gt;numKeys&amp;lt;/code&amp;gt; will return {{code|code={1, 3, 4}|lang=lua}}.&lt;br /&gt;
&lt;br /&gt;
== affixNums ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.affixNums(t, prefix, suffix)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes a table &amp;lt;code&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/code&amp;gt; and returns an array containing the numbers of keys with the optional prefix &amp;lt;code&amp;gt;&#039;&#039;prefix&#039;&#039;&amp;lt;/code&amp;gt; and the optional suffix &amp;lt;code&amp;gt;&#039;&#039;suffix&#039;&#039;&amp;lt;/code&amp;gt;. For example, for the table {{code|code={a1 = &#039;foo&#039;, a3 = &#039;bar&#039;, a6 = &#039;baz&#039;}|lang=lua}} and the prefix &amp;lt;code&amp;gt;&#039;a&#039;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;affixNums&amp;lt;/code&amp;gt; will return {{code|code={1, 3, 6}|lang=lua}}. All characters in &amp;lt;code&amp;gt;&#039;&#039;prefix&#039;&#039;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&#039;&#039;suffix&#039;&#039;&amp;lt;/code&amp;gt; are interpreted literally.&lt;br /&gt;
&lt;br /&gt;
See {{mfl|params|call_for_each_group}} and {{mfl|params|grouping_by_calling}} for doing something similar from a wiki template.&lt;br /&gt;
&lt;br /&gt;
== numData ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.numData(t, compress)&lt;br /&gt;
&amp;lt;/pre&lt;br /&gt;
&lt;br /&gt;
Given a table with keys like &amp;lt;code&amp;gt;&amp;quot;foo1&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;bar1&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;foo2&amp;quot;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;&amp;quot;baz2&amp;quot;&amp;lt;/code&amp;gt;, returns a table of subtables in the format {{code|code={ [1] = {foo = &#039;text&#039;, bar = &#039;text&#039;}, [2] = {foo = &#039;text&#039;, baz = &#039;text&#039;} }|lang=lua}}. Keys that don&#039;t end with an integer are stored in a subtable named &amp;lt;code&amp;gt;&amp;quot;other&amp;quot;&amp;lt;/code&amp;gt;. The compress option compresses the table so that it can be iterated over with &amp;lt;code&amp;gt;ipairs&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== compressSparseArray ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.compressSparseArray(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes an array &amp;lt;code&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/code&amp;gt; with one or more nil values, and removes the nil values while preserving the order, so that the array can be safely traversed with &amp;lt;code&amp;gt;ipairs&amp;lt;/code&amp;gt;. Any keys that are not positive integers are removed. For example, for the table {{code|code={1, nil, foo = &#039;bar&#039;, 3, 2}|lang=lua}}, &amp;lt;code&amp;gt;compressSparseArray&amp;lt;/code&amp;gt; will return {{code|code={1, 3, 2}|lang=lua}}.&lt;br /&gt;
&lt;br /&gt;
See {{mfl|params|squeezing}} for doing something similar from a wiki template.&lt;br /&gt;
&lt;br /&gt;
== sparseIpairs ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.sparseIpairs(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is an iterator function for traversing a sparse array &amp;lt;code&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/code&amp;gt;. It is similar to &amp;lt;code&amp;gt;[[mw:Extension:Scribunto/Lua reference manual#ipairs|ipairs]]&amp;lt;/code&amp;gt;, but will continue to iterate until the highest numerical key, whereas &amp;lt;code&amp;gt;ipairs&amp;lt;/code&amp;gt; may stop after the first &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; value. Any keys that are not positive integers are ignored.&lt;br /&gt;
&lt;br /&gt;
Usually &amp;lt;code&amp;gt;sparseIpairs&amp;lt;/code&amp;gt; is used in a generic &amp;lt;code&amp;gt;for&amp;lt;/code&amp;gt; loop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
for i, v in TableTools.sparseIpairs(t) do&lt;br /&gt;
   -- code block&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;sparseIpairs&amp;lt;/code&amp;gt; uses the &amp;lt;code&amp;gt;[[mw:Extension:Scribunto/Lua reference manual#pairs|pairs]]&amp;lt;/code&amp;gt; function in its implementation. Although some table keys appear to be ignored, all table keys are accessed when it is run.&lt;br /&gt;
&lt;br /&gt;
== size ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.size(t)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finds the size of a key/value pair table ([[associative array]]). For example, for {{code|code={foo = &#039;foo&#039;, bar = &#039;bar&#039;}|lang=lua}}, &amp;lt;code&amp;gt;size&amp;lt;/code&amp;gt; will return &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;. The function will also work on arrays, but for arrays it is more efficient to use the &amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; operator. Note that to find the size, this function uses the &amp;lt;code&amp;gt;[[mw:Extension:Scribunto/Lua reference manual#pairs|pairs]]&amp;lt;/code&amp;gt; function to iterate through all of the keys.&lt;br /&gt;
&lt;br /&gt;
== keysToList ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
TableTools.keysToList(t, keySort, checked)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns a list of the keys in a table, sorted using either a default comparison function or a custom &amp;lt;code&amp;gt;&#039;&#039;keySort&#039;&#039;&amp;lt;/code&amp;gt; function, which follows the same rules as the &amp;lt;code&amp;gt;comp&amp;lt;/code&amp;gt; function supplied to &amp;lt;code&amp;gt;[[mw:Extension:Scribunto/Lua reference manual#table.sort|table.sort]]&amp;lt;/code&amp;gt;. If &amp;lt;code&amp;gt;&#039;&#039;keySort&#039;&#039;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, no sorting is done. Set &amp;lt;code&amp;gt;&#039;&#039;checked&#039;&#039;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; to skip the internal type checking.&lt;br /&gt;
&lt;br /&gt;
== sortedPairs ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.sortedPairs(t, keySort)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Iterates through a table, with the keys sorted using the &amp;lt;code&amp;gt;keysToList&amp;lt;/code&amp;gt; function. If there are only numerical keys, &amp;lt;code&amp;gt;sparseIpairs&amp;lt;/code&amp;gt; is probably more efficient.&lt;br /&gt;
&lt;br /&gt;
== isArray ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.isArray(value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;&#039;&#039;value&#039;&#039;&amp;lt;/code&amp;gt; is a table and all keys are consecutive integers starting at 1.&lt;br /&gt;
&lt;br /&gt;
== isArrayLike ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.isArrayLike(value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;&#039;&#039;value&#039;&#039;&amp;lt;/code&amp;gt; is iterable and all keys are consecutive integers starting at 1.&lt;br /&gt;
&lt;br /&gt;
== invert ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.invert(arr)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Transposes the keys and values in an array. For example, {{code|invert{ &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot; }|lua}} yields {{code|code={ a=1, b=2, c=3 }|lang=lua}}.&lt;br /&gt;
&lt;br /&gt;
== listToSet ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.listToSet(arr)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a set from the array part of the table &amp;lt;code&amp;gt;&#039;&#039;arr&#039;&#039;&amp;lt;/code&amp;gt;. Indexing the set by any of the values of the array returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;. For example, {{code|listToSet{ &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot; }|lua}} yields {{code|code={ a=true, b=true, c=true }|lang=lua}}.&lt;br /&gt;
&lt;br /&gt;
== deepCopy ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.deepCopy(orig, noMetatable, alreadySeen)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a copy of the table &amp;lt;code&amp;gt;&#039;&#039;orig&#039;&#039;&amp;lt;/code&amp;gt;. As with &amp;lt;code&amp;gt;mw.clone&amp;lt;/code&amp;gt;, all values that are not functions are duplicated and the identity of tables is preserved. If &amp;lt;code&amp;gt;&#039;&#039;noMetatable&#039;&#039;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, then the metatable (if any) is not copied. Can copy tables loaded with &amp;lt;code&amp;gt;mw.loadData&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Similar to &amp;lt;code&amp;gt;mw.clone&amp;lt;/code&amp;gt;, but &amp;lt;code&amp;gt;mw.clone&amp;lt;/code&amp;gt; cannot copy tables loaded with &amp;lt;code&amp;gt;mw.loadData&amp;lt;/code&amp;gt; and does not allow metatables &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; to be copied.&lt;br /&gt;
&lt;br /&gt;
== sparseConcat ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.sparseConcat(t, sep, i, j)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Concatenates all values in the table that are indexed by a positive integer, in order. For example, {{code|sparseConcat{ &amp;quot;a&amp;quot;, nil, &amp;quot;c&amp;quot;, &amp;quot;d&amp;quot; }|lua}} yields {{code|&amp;quot;acd&amp;quot;|lua}} and {{code|sparseConcat{ nil, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;, &amp;quot;d&amp;quot; }|lua}} yields {{code|&amp;quot;bcd&amp;quot;|lua}}.&lt;br /&gt;
&lt;br /&gt;
== length ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.length(t, prefix)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finds the length of an array or of a quasi-array with keys with an optional &amp;lt;code&amp;gt;&#039;&#039;prefix&#039;&#039;&amp;lt;/code&amp;gt; such as &amp;quot;data1&amp;quot;, &amp;quot;data2&amp;quot;, etc. It uses an [[exponential search]] algorithm to find the length, so as to use as few table lookups as possible.&lt;br /&gt;
&lt;br /&gt;
This algorithm is useful for arrays that use metatables (e.g. [[mw:Extension:Scribunto/Lua reference manual#frame.args|frame.args]]) and for quasi-arrays. For normal arrays, just use the [[mw:Extension:Scribunto/Lua reference manual#Length operator|# operator]], as it is implemented in [[C (programming language)|C]] and will be quicker.&lt;br /&gt;
&lt;br /&gt;
== inArray ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;TableTools.inArray(array, searchElement)&lt;br /&gt;
TableTools.inArray(array, searchElement, fromIndex)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;&#039;&#039;searchElement&#039;&#039;&amp;lt;/code&amp;gt; is a member of the array &amp;lt;code&amp;gt;&#039;&#039;array&#039;&#039;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; otherwise. Equivalent to the javascript [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes Array.prototype.includes()] function, except fromIndex is 1-indexed instead of zero-indexed.&lt;br /&gt;
&lt;br /&gt;
=== fromIndex ===&lt;br /&gt;
&amp;lt;code&amp;gt;fromIndex&amp;lt;/code&amp;gt; is the optional 1-based index at which to start searching. If &amp;lt;code&amp;gt;fromIndex&amp;lt;/code&amp;gt; is not present, all values in the array will be searched and the array will be treated as a table/[[associative array]] (it will be iterated over using &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; inline&amp;gt;pairs()&amp;lt;/syntaxhighlight&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;fromIndex&amp;lt;/code&amp;gt; is present and an integer, the array is assumed to be a conventional array/sequence/list (indexed with consecutive integer keys starting at &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, and interated over using &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; inline&amp;gt;ipairs()&amp;lt;/syntaxhighlight&amp;gt;). Only the values whose index is &amp;lt;code&amp;gt;fromIndex&amp;lt;/code&amp;gt; or higher will be searched.&lt;br /&gt;
&lt;br /&gt;
In the following examples, &amp;lt;code&amp;gt;#array&amp;lt;/code&amp;gt; represents the length of the integer-keyed portion of the array.&lt;br /&gt;
&lt;br /&gt;
* If &amp;lt;code&amp;gt;fromIndex &amp;lt; 0&amp;lt;/code&amp;gt; it will count back from the end of the array, e.g. a value of &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; will only search the last integer-keyed element in the array. If &amp;lt;code&amp;gt;fromIndex &amp;lt;= (-1 * #array)&amp;lt;/code&amp;gt;, the entire integer-keyed portion of the array will be searched.&lt;br /&gt;
* If &amp;lt;code&amp;gt;fromIndex = 0&amp;lt;/code&amp;gt; it will be treated as a &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; and the entire integer-keyed portion of the array will be searched.&lt;br /&gt;
* If &amp;lt;code&amp;gt;fromIndex &amp;gt; #array&amp;lt;/code&amp;gt;, the array is not searched and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; is returned.&lt;br /&gt;
&lt;br /&gt;
== merge ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.merge(...)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Given the arrays, returns an array containing the elements of each input array in sequence.&lt;br /&gt;
&lt;br /&gt;
== extend ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TableTools.extend(arr1, arr2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Extends the first array in place by appending all elements from the second array.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* {{ml|params|}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
[[Category:Lua metamodules|TableTools]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
	<entry>
		<id>https://isekai.wiki/index.php?title=Category:Module_documentation_subpages_imported_from_Wikipedia&amp;diff=6498</id>
		<title>Category:Module documentation subpages imported from Wikipedia</title>
		<link rel="alternate" type="text/html" href="https://isekai.wiki/index.php?title=Category:Module_documentation_subpages_imported_from_Wikipedia&amp;diff=6498"/>
		<updated>2025-07-31T18:49:16Z</updated>

		<summary type="html">&lt;p&gt;FaeriMagic: Created page with &amp;quot;Category:Module documentation subpages Category:Page accreditations&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Module documentation subpages]] [[Category:Page accreditations]]&lt;/div&gt;</summary>
		<author><name>FaeriMagic</name></author>
	</entry>
</feed>