Repository navigation
NoincludeToken
Bhsd edited this page Jul 7, 2026
·
19 revisions
非嵌入时为<noinclude>,嵌入时为<includeonly>或<onlyinclude>。这个类继承了 Token 类的全部属性和方法,这里不再列出。
展开
returns: this
深拷贝节点。
// cloneNode (main)
var {firstChild} = Parser.parse("</noinclude>");
assert.equal(firstChild, "</noinclude>");
assert.deepStrictEqual(firstChild.cloneNode(), firstChild);✅ 展开
returns: LintError[]
报告潜在语法错误。
// lint
var {firstChild} = Parser.parse("<noinclude foo/>");
assert.equal(firstChild, "<noinclude foo/>");
assert.deepStrictEqual(firstChild.lint(), [
{
rule: "no-ignored",
severity: "warning",
message: "useless attribute",
startLine: 0,
startCol: 10,
startIndex: 10,
endLine: 0,
endCol: 14,
endIndex: 14,
suggestions: [
{
desc: "remove",
range: [10, 14],
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