Browse Source

removed unused code

pull/41/head
Vitaly Puzrin 11 years ago
parent
commit
9a7584f4a7
  1. 13
      lib/renderer.js

13
lib/renderer.js

@ -93,19 +93,8 @@ rules.paragraph_open = function (tokens, idx /*, options, env */) {
return tokens[idx].tight ? '' : '<p>';
};
rules.paragraph_close = function (tokens, idx /*, options, env */) {
// We have 2 cases of "hidden" paragraphs
//
// 1. In tight lists
// 2. When content was stripped (reference definition, for example)
//
if (tokens[idx].tight === true) {
if (!tokens[idx - 1].content) {
return '';
}
if (tokens[idx + 1].type.slice(-5) === 'close') {
return '';
}
return '\n';
return tokens[idx + 1].type.slice(-5) === 'close' ? '' : '\n';
}
return '</p>\n';
};

Loading…
Cancel
Save