do not throw error when trying to match tag at the end of the document
This commit is contained in:
parent
5e4facea44
commit
e1a5492a7f
1 changed files with 5 additions and 2 deletions
|
|
@ -545,9 +545,12 @@ var Editor = function(renderer, session) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (token.type.indexOf("tag-open") != -1)
|
||||
if (token.type.indexOf("tag-open") != -1) {
|
||||
token = iterator.stepForward();
|
||||
|
||||
if (!token)
|
||||
return;
|
||||
}
|
||||
|
||||
var tag = token.value;
|
||||
var depth = 0;
|
||||
var prevToken = iterator.stepBackward();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue