MCPcopy Create free account
hub / github.com/anilkumarum/mark-clipper / parse

Method parse

panel/markdown/parser/parser.js:22–30  ·  view source on GitHub ↗

@public @param {string} buffer

(buffer)

Source from the content-addressed store, hash-verified

20
21 /**@public @param {string} buffer*/
22 parse(buffer) {
23 /**@type {Element[]} */
24 this.nodeStack = [this.root];
25 this.tokenizer.consume(buffer);
26
27 const htmlElements = { type: "root", children: this.root.children };
28 this.root = { type: "root", children: [] };
29 return htmlElements;
30 }
31
32 /** @param {Element|Text} element*/
33 addChildElement(element) {

Callers 1

processPastedHtmlMethod · 0.80

Calls 1

consumeMethod · 0.80

Tested by

no test coverage detected