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

don't match empty inline block

parent bdb3036e
Branches
No related tags found
No related merge requests found
...@@ -61,6 +61,12 @@ function math_inline(state, silent){ ...@@ -61,6 +61,12 @@ function math_inline(state, silent){
return false; return false;
} }
if (start + 1 === state.pos) {
// There is nothing between the delimiters -- don't match.
state.pos = start;
return false;
}
//found the closing delimiter and state.pos is pointing it //found the closing delimiter and state.pos is pointing it
token = state.push('math_inline','math',0); token = state.push('math_inline','math',0);
token.content = state.src.slice(start+1,state.pos).trim(); token.content = state.src.slice(start+1,state.pos).trim();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment