Browse Source

Fix blockquotes inside lists

Need to zero out blkIndent, failed test:
---
* a
  > b
  >
* c
---
pull/14/head
Alex Kocharin 10 years ago
parent
commit
691516762a
  1. 5
      lib/lexer_block/blockquote.js

5
lib/lexer_block/blockquote.js

@ -7,7 +7,7 @@ var skipSpaces = require('../helpers').skipSpaces;
module.exports = function blockquote(state, startLine, endLine, silent) { module.exports = function blockquote(state, startLine, endLine, silent) {
var nextLine, lastLineEmpty, oldTShift, oldBMarks, i, var nextLine, lastLineEmpty, oldTShift, oldBMarks, i, oldIndent,
rules_named = state.lexerBlock.rules_named, rules_named = state.lexerBlock.rules_named,
pos = state.bMarks[startLine] + state.tShift[startLine], pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine]; max = state.eMarks[startLine];
@ -26,6 +26,8 @@ module.exports = function blockquote(state, startLine, endLine, silent) {
state.bqMarks[startLine]++; state.bqMarks[startLine]++;
state.bqLevel++; state.bqLevel++;
oldIndent = state.blkIndent;
state.blkIndent = 0;
oldBMarks = [ state.bMarks[startLine] ]; oldBMarks = [ state.bMarks[startLine] ];
state.bMarks[startLine] = pos; state.bMarks[startLine] = pos;
@ -112,6 +114,7 @@ module.exports = function blockquote(state, startLine, endLine, silent) {
state.tShift[i + startLine] = oldTShift[i]; state.tShift[i + startLine] = oldTShift[i];
} }
state.bqLevel--; state.bqLevel--;
state.blkIndent = oldIndent;
return true; return true;
}; };

Loading…
Cancel
Save