1
0
Fork 0

render unclosed display block

This commit is contained in:
Waylon Flinn 2016-04-22 11:59:42 -05:00
parent 2a45cb8b71
commit 152877dc41

View file

@ -88,23 +88,26 @@ function math_block(state, start, end, silent){
found = true;
}
for(next = start; next < end; ){
if(found){ break; }
for(next = start; !found; ){
next++;
if(next >= end){ break; }
pos = state.bMarks[next]+state.tShift[next];
max = state.eMarks[next];
if(pos < max && state.tShift[next] < state.blkIndent){
// non-empty line with negative indent should stop the list:
break;
}
if(state.src.slice(pos,max).trim().slice(-2)==='$$'){
lastPos = state.src.slice(0,max).lastIndexOf('$$');
lastLine = state.src.slice(pos,lastPos);
found = true;
}
}
if(!found){
return false;
}
state.line = next + 1;