MCPcopy
hub / github.com/witheve/Eve / tag

Function tag

src/commonmark.js:2324–2342  ·  view source on GitHub ↗
(name, attrs, selfclosing)

Source from the content-addressed store, hash-verified

2322
2323// Helper function to produce an HTML tag.
2324function tag(name, attrs, selfclosing) {
2325 if (this.disableTags > 0) {
2326 return;
2327 }
2328 this.buffer += ('<' + name);
2329 if (attrs && attrs.length > 0) {
2330 var i = 0;
2331 var attrib;
2332 while ((attrib = attrs[i]) !== undefined) {
2333 this.buffer += (' ' + attrib[0] + '="' + attrib[1] + '"');
2334 i++;
2335 }
2336 }
2337 if (selfclosing) {
2338 this.buffer += ' /';
2339 }
2340 this.buffer += '>';
2341 this.lastOut = '>';
2342}
2343
2344
2345function HtmlRenderer(options) {

Callers 1

renderNodesFunction · 0.85

Calls 1

escapeXmlFunction · 0.85

Tested by

no test coverage detected