-
Notifications
You must be signed in to change notification settings - Fork 2
ExtLinkToken
bhsd edited this page Dec 18, 2023
·
12 revisions
[]
内的外部链接。这个类同时混合了 MagicLinkToken 类的属性和方法。
以下所有属性和方法在 Mini 和 Browser 版本中均不可用。
展开
type: string
链接显示文字。
// innerText
var {firstChild, lastChild} = Parser.parse('[//a][//b bb]');
assert.equal(firstChild, '[//a]');
assert.equal(lastChild, '[//b bb]');
assert.strictEqual(firstChild.innerText, '[1]');
assert.strictEqual(lastChild.innerText, 'bb');
firstChild.innerText = 'a';
assert.equal(firstChild, '[//a a]');
展开
returns: this
深拷贝节点。
// cloneNode
var {firstChild} = Parser.parse('[//a b]');
assert.deepStrictEqual(firstChild.cloneNode(), firstChild);
展开
param: string
链接显示文字
设置链接显示文字。
// setLinkText
var {firstChild} = Parser.parse('[//a]');
firstChild.setLinkText('a');
assert.equal(firstChild, '[//a a]');
对维基文本批量执行语法检查的命令行工具
用于维基文本的 VSCode 扩展
A command-line tool that performs linting on Wikitext in bulk
VSCode extension for Wikitext