From a89d6758d76d89713fe831a489a0110dc57cf517 Mon Sep 17 00:00:00 2001 From: Alex Kocharin Date: Fri, 16 Jan 2015 13:48:36 +0300 Subject: [PATCH] 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 --- lib/rules_block/list.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/rules_block/list.js b/lib/rules_block/list.js index dda8eb7..4ee6072 100644 --- a/lib/rules_block/list.js +++ b/lib/rules_block/list.js @@ -165,10 +165,6 @@ module.exports = function list(state, startLine, endLine, silent) { // (the rest is just indented code block) 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" // ^^^^^ - calculating total length of this thing indent = (posAfterMarker - state.bMarks[nextLine]) + indentAfterMarker;