From 6629917dec331d88591930eebaaead03affd1ea1 Mon Sep 17 00:00:00 2001 From: Vas Sudanagunta Date: Wed, 29 Jul 2020 01:58:51 -0400 Subject: [PATCH] Remove unnecessary calculation --- lib/rules_block/blockquote.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/rules_block/blockquote.js b/lib/rules_block/blockquote.js index 111610e..a02699a 100644 --- a/lib/rules_block/blockquote.js +++ b/lib/rules_block/blockquote.js @@ -40,8 +40,8 @@ module.exports = function blockquote(state, startLine, endLine, silent) { // so no point trying to find the end of it in silent mode if (silent) { return true; } - // skip spaces after ">" and re-calculate offset - initial = offset = state.sCount[startLine] + pos - (state.bMarks[startLine] + state.tShift[startLine]); + // set offset past spaces and ">" + initial = offset = state.sCount[startLine] + 1; // skip one optional space after '>' if (state.src.charCodeAt(pos) === 0x20 /* space */) { @@ -147,8 +147,8 @@ module.exports = function blockquote(state, startLine, endLine, silent) { if (state.src.charCodeAt(pos++) === 0x3E/* > */ && !isOutdented) { // This line is inside the blockquote. - // skip spaces after ">" and re-calculate offset - initial = offset = state.sCount[nextLine] + pos - (state.bMarks[nextLine] + state.tShift[nextLine]); + // set offset past spaces and ">" + initial = offset = state.sCount[nextLine] + 1; // skip one optional space after '>' if (state.src.charCodeAt(pos) === 0x20 /* space */) {