Skip to content
Snippets Groups Projects
Commit 152877dc authored by Waylon Flinn's avatar Waylon Flinn
Browse files

render unclosed display block

parent 2a45cb8b
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment