mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 06:37:10 -04:00
fix renumbering when indented text is mixed with regular lists
This commit is contained in:
parent
9fd50b3e9f
commit
06d5e345c0
1 changed files with 7 additions and 4 deletions
|
@ -5178,8 +5178,11 @@ function OUTER(gscope)
|
||||||
}
|
}
|
||||||
|
|
||||||
//2-find the first line of the list
|
//2-find the first line of the list
|
||||||
while(lineNum-1 >= 0 && getLineListType(lineNum-1))
|
while(lineNum-1 >= 0 && (type=getLineListType(lineNum-1)))
|
||||||
{
|
{
|
||||||
|
type = /([a-z]+)[12345678]/.exec(type);
|
||||||
|
if(type[1] == "indent")
|
||||||
|
break;
|
||||||
lineNum--;
|
lineNum--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5197,9 +5200,9 @@ function OUTER(gscope)
|
||||||
while(listType = getLineListType(line))
|
while(listType = getLineListType(line))
|
||||||
{
|
{
|
||||||
//apply new num
|
//apply new num
|
||||||
curLevel = /[a-z]+([12345678])/.exec(listType);
|
listType = /([a-z]+)([12345678])/.exec(listType);
|
||||||
curLevel = Number(curLevel[1]);
|
curLevel = Number(listType[2]);
|
||||||
if(isNaN(curLevel))
|
if(isNaN(curLevel) || listType[0] == "indent")
|
||||||
{
|
{
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue