|
|
| (4 intermediate revisions by the same user not shown) |
| Line 1: |
Line 1: |
| ---
| |
| --- This module provides utilities for processing template arguments.
| |
| ---
| |
| --- 1. Function norm():
| |
| --- Cleans template arguments by removing empty values and trimming whitespace.
| |
| --- Example: {{Template|a| |b| }} becomes {a="a", b="b"}
| |
| ---
| |
| --- 2. Function merge():
| |
| --- Combines current template parameters with parent template parameters.
| |
| --- Example: Current template <code>{{Child|y=2}} + parent {{Parent|x=1}} = {y="2", x="1"}</code>
| |
| ---
| |
| --- Source: https://minecraft.wiki/w/Module:ProcessArgs
| |
| ---
| |
|
| |
| local p = {} | | local p = {} |
|
| |
|
| Line 60: |
Line 46: |
| return args | | return args |
| end | | end |
|
| |
|
| |
|
|
| |
|
| return p | | return p |