(block)
| 81 | // Returns true if block ends with a blank line, descending if needed |
| 82 | // into lists and sublists. |
| 83 | var 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. |