Browse Source

Remove dead code in list.js

It was there because of the overly-defensive programming.

indentAfterMarker is set to 1 in line 159, it's never less than that
pull/41/head
Alex Kocharin 10 years ago
parent
commit
a89d6758d7
  1. 4
      lib/rules_block/list.js

4
lib/rules_block/list.js

@ -165,10 +165,6 @@ module.exports = function list(state, startLine, endLine, silent) {
// (the rest is just indented code block) // (the rest is just indented code block)
if (indentAfterMarker > 4) { indentAfterMarker = 1; } if (indentAfterMarker > 4) { indentAfterMarker = 1; }
// If indent is less than 1, assume that it's one, example:
// "-\n test"
if (indentAfterMarker < 1) { indentAfterMarker = 1; }
// " - test" // " - test"
// ^^^^^ - calculating total length of this thing // ^^^^^ - calculating total length of this thing
indent = (posAfterMarker - state.bMarks[nextLine]) + indentAfterMarker; indent = (posAfterMarker - state.bMarks[nextLine]) + indentAfterMarker;

Loading…
Cancel
Save