-
Notifications
You must be signed in to change notification settings - Fork 3
ParamTagToken (EN)
Bhsd edited this page Dec 13, 2025
·
3 revisions
Content of extension tags that specify parameters line by line, used for the <dynamicpagelist> tag. This class inherits all the properties and methods of the MultiLineToken class.
✅ Available in the Mini and Browser versions.
Inherited properties from MultiLineToken
Inherited methods from MultiLineToken
Expand
returns: this
Deep clone the node.
// cloneNode (main)
var {
firstChild: {lastChild},
} = Parser.parse('<dynamicpagelist>category = A</dynamicpagelist>');
assert.equal(lastChild, 'category = A');
assert.deepStrictEqual(lastChild.cloneNode(), lastChild);✅ Expand
returns: LintError[]
Report potential grammar errors.
// lint
var {firstChild: {lastChild}} = Parser.parse(`<dynamicpagelist>
category=<nowiki>a</nowiki>
</dynamicpagelist>`);
assert.equal(lastChild, '\ncategory=<nowiki>a</nowiki>\n');
assert.deepStrictEqual(lastChild.lint(), [
{
rule: 'no-ignored',
severity: 'error',
message: 'invalid parameter of <dynamicpagelist>',
startLine: 1,
startCol: 0,
startIndex: 18,
endLine: 1,
endCol: 27,
endIndex: 45,
},
]);
({firstChild: {lastChild}} = Parser.parse(`<inputbox>
[type=create]
# {{template}}
</inputbox>`));
assert.equal(lastChild, '\n[type=create]\n# {{template}}\n');
assert.deepStrictEqual(lastChild.lint(), [
{
rule: 'no-ignored',
severity: 'error',
message: 'invalid parameter of <inputbox>',
startLine: 1,
startCol: 0,
startIndex: 11,
endLine: 1,
endCol: 13,
endIndex: 24,
suggestions: [
{
desc: 'remove',
range: [11, 24],
text: '',
},
],
},
{
rule: 'no-ignored',
severity: 'error',
message: 'invalid parameter of <inputbox>',
startLine: 2,
startCol: 0,
startIndex: 25,
endLine: 2,
endCol: 14,
endIndex: 39,
suggestions: [
{
desc: 'remove',
range: [25, 39],
text: '',
},
],
},
]);对维基文本批量执行语法检查的命令行工具
轻量级的维基模板解析器
维基文本语言服务器协议实现
用于维基文本的 VS Code 扩展
A command-line tool that performs linting on Wikitext in bulk
A lightweight Wikitext template parser
An implementation of the Language Server Protocol for Wikitext
VS Code extension for Wikitext