HrToken (EN) - bhsd-harry/wikiparser-node GitHub Wiki
Horizontal Rule. This class inherits all the properties and methods of the Token class which are not repeated here.
All of the following properties and methods are not available in the Mini and Browser versions.
Expand
returns: this
Deep clone the node.
// cloneNode (main)
var {firstChild} = Parser.parse('----');
assert.equal(firstChild, '----');
assert.deepStrictEqual(firstChild.cloneNode(), firstChild);
Expand
version added: 1.10.0
returns: string
Convert to HTML.
// toHtml (main)
var {firstChild} = Parser.parse('----');
assert.strictEqual(firstChild.toHtml(), '<hr>');