better regexp for line items

pull/2467/head
John McLear 2015-01-19 00:28:32 +00:00
parent 0bd7914c3b
commit 33c62329ba
1 changed files with 3 additions and 3 deletions

View File

@ -5106,7 +5106,7 @@ function Ace2Inner(){
{ {
return null; return null;
} }
type = /([a-z]+)[0-9+]/.exec(type); type = /([a-z]+)[0-9]+/.exec(type);
if(type[1] == "indent") if(type[1] == "indent")
{ {
return null; return null;
@ -5115,7 +5115,7 @@ function Ace2Inner(){
//2-find the first line of the list //2-find the first line of the list
while(lineNum-1 >= 0 && (type=getLineListType(lineNum-1))) while(lineNum-1 >= 0 && (type=getLineListType(lineNum-1)))
{ {
type = /([a-z]+)[0-9+]/.exec(type); type = /([a-z]+)[0-9]+/.exec(type);
if(type[1] == "indent") if(type[1] == "indent")
break; break;
lineNum--; lineNum--;
@ -5135,7 +5135,7 @@ function Ace2Inner(){
while(listType = getLineListType(line)) while(listType = getLineListType(line))
{ {
//apply new num //apply new num
listType = /([a-z]+)([0-9+])/.exec(listType); listType = /([a-z]+)([0-9]+)/.exec(listType);
curLevel = Number(listType[2]); curLevel = Number(listType[2]);
if(isNaN(curLevel) || listType[0] == "indent") if(isNaN(curLevel) || listType[0] == "indent")
{ {