Browse Source

Removed unnecessary checks

pull/82/head
Vitaly Puzrin 10 years ago
parent
commit
d6128515b3
  1. 9
      lib/rules_block/paragraph.js
  2. 2
      lib/rules_block/reference.js

9
lib/rules_block/paragraph.js

@ -4,16 +4,12 @@
module.exports = function paragraph(state, startLine/*, endLine*/) {
var endLine, content, terminate, i, l, token,
var content, terminate, i, l, token,
nextLine = startLine + 1,
terminatorRules;
terminatorRules = state.md.block.ruler.getRules('paragraph'),
endLine = state.lineMax;
// jump line-by-line until empty one or EOF
if (nextLine < endLine && !state.isEmpty(nextLine)) {
terminatorRules = state.md.block.ruler.getRules('paragraph');
for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
// this would be a code block normally, but after paragraph
// it's considered a lazy continuation regardless of what's there
@ -29,7 +25,6 @@ module.exports = function paragraph(state, startLine/*, endLine*/) {
}
if (terminate) { break; }
}
}
content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();

2
lib/rules_block/reference.js

@ -43,7 +43,6 @@ module.exports = function reference(state, startLine, _endLine, silent) {
endLine = state.lineMax;
// jump line-by-line until empty one or EOF
if (nextLine < endLine && !state.isEmpty(nextLine)) {
terminatorRules = state.md.block.ruler.getRules('reference');
for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
@ -61,7 +60,6 @@ module.exports = function reference(state, startLine, _endLine, silent) {
}
if (terminate) { break; }
}
}
str = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
max = str.length;

Loading…
Cancel
Save