Browse Source

Remove unnecessary calculation

pull/713/head
Vas Sudanagunta 4 years ago
committed by Alex Kocharin
parent
commit
6629917dec
  1. 8
      lib/rules_block/blockquote.js

8
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 // so no point trying to find the end of it in silent mode
if (silent) { return true; } if (silent) { return true; }
// skip spaces after ">" and re-calculate offset // set offset past spaces and ">"
initial = offset = state.sCount[startLine] + pos - (state.bMarks[startLine] + state.tShift[startLine]); initial = offset = state.sCount[startLine] + 1;
// skip one optional space after '>' // skip one optional space after '>'
if (state.src.charCodeAt(pos) === 0x20 /* space */) { 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) { if (state.src.charCodeAt(pos++) === 0x3E/* > */ && !isOutdented) {
// This line is inside the blockquote. // This line is inside the blockquote.
// skip spaces after ">" and re-calculate offset // set offset past spaces and ">"
initial = offset = state.sCount[nextLine] + pos - (state.bMarks[nextLine] + state.tShift[nextLine]); initial = offset = state.sCount[nextLine] + 1;
// skip one optional space after '>' // skip one optional space after '>'
if (state.src.charCodeAt(pos) === 0x20 /* space */) { if (state.src.charCodeAt(pos) === 0x20 /* space */) {

Loading…
Cancel
Save