MCPcopy Create free account
hub / github.com/witheve/Eve / endsWithBlankLine

Function endsWithBlankLine

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

Source from the content-addressed store, hash-verified

81// Returns true if block ends with a blank line, descending if needed
82// into lists and sublists.
83var endsWithBlankLine = function(block) {
84 while (block) {
85 if (block._lastLineBlank) {
86 return true;
87 }
88 var t = block.type;
89 if (t === 'list' || t === 'item') {
90 block = block._lastChild;
91 } else {
92 break;
93 }
94 }
95 return false;
96};
97
98// Add a line to the block at the tip. We assume the tip
99// can accept lines -- that check should be done before calling this.

Callers 1

commonmark.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected