-
Notifications
You must be signed in to change notification settings - Fork 2
ListToken (EN)
bhsd edited this page Jul 4, 2024
·
5 revisions
List at the start of the line.
All of the following properties and methods are not available in the Mini and Browser versions.
Expand
type: boolean
Whether it contains :
, read-only.
// dd (main)
var {firstChild} = Parser.parse(':');
assert(firstChild.dd);
Expand
type: boolean
Whether it contains ;
, read-only.
// dt (main)
var {firstChild} = Parser.parse(';');
assert(firstChild.dt);
Expand
type: boolean
Whether it contains *
, read-only.
// ul (main)
var {firstChild} = Parser.parse('*');
assert(firstChild.ul);
Expand
type: boolean
Whether it contains #
, read-only.
// ol (main)
var {firstChild} = Parser.parse('#');
assert(firstChild.ol);
Expand
returns: this
Deep clone the node.
// cloneNode (main)
var {firstChild} = Parser.parse(';');
assert.deepStrictEqual(firstChild.cloneNode(), firstChild);
Expand
returns: Token
Get the range of the list.
// getRange (main)
var {firstChild} = Parser.parse(';a');
assert.equal(firstChild.getRange(), 'a');
({firstChild} = Parser.parse(';a:b'));
assert.equal(firstChild.getRange(), 'a');
对维基文本批量执行语法检查的命令行工具
用于维基文本的 ESLint 插件
A command-line tool that performs linting on Wikitext in bulk
ESLint plugin for Wikitext