|
|
@ -229,7 +229,7 @@ function Renderer() { |
|
|
|
|
|
|
|
|
|
|
|
Renderer.prototype.render = function (tokens, options) { |
|
|
|
var i, len, name, next, |
|
|
|
var i, len, name, |
|
|
|
result = '', |
|
|
|
rules = this.rules, |
|
|
|
tightStack = []; |
|
|
@ -264,13 +264,8 @@ Renderer.prototype.render = function (tokens, options) { |
|
|
|
} |
|
|
|
if (name === 'paragraph_close' && tight) { |
|
|
|
// Quick hack - texts should have LF if followed by blocks
|
|
|
|
if (i + 1 < tokens.length) { |
|
|
|
next = tokens[i + 1].type; |
|
|
|
if (next === 'bullet_list_open' || |
|
|
|
next === 'ordered_list_open' || |
|
|
|
next === 'blockquote_open') { |
|
|
|
result += '\n'; |
|
|
|
} |
|
|
|
if (tokens[i + 1].type !== 'list_item_close') { |
|
|
|
result += '\n'; |
|
|
|
} |
|
|
|
|
|
|
|
continue; |
|
|
|