MCPcopy Index your code
hub / github.com/witheve/Eve / parseBang

Function parseBang

src/commonmark.js:1588–1603  ·  view source on GitHub ↗
(block)

Source from the content-addressed store, hash-verified

1586// IF next character is [, and ! delimiter to delimiter stack and
1587// add a text node to block's children. Otherwise just add a text node.
1588var parseBang = function(block) {
1589 var startpos = this.pos;
1590 this.pos += 1;
1591 if (this.peek() === C_OPEN_BRACKET) {
1592 this.pos += 1;
1593
1594 var node = text('![');
1595 block.appendChild(node);
1596
1597 // Add entry to stack for this opener
1598 this.addBracket(node, startpos + 1, true);
1599 } else {
1600 block.appendChild(text('!'));
1601 }
1602 return true;
1603};
1604
1605// Try to match close bracket against an opening in the delimiter
1606// stack. Add either a link or image, or a plain [ character,

Callers

nothing calls this directly

Calls 2

textFunction · 0.85
peekMethod · 0.80

Tested by

no test coverage detected