don't match empty inline block
This commit is contained in:
parent
bdb3036eb7
commit
0c737c10ba
1 changed files with 6 additions and 0 deletions
6
index.js
6
index.js
|
@ -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();
|
||||||
|
|
Reference in a new issue