mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
line parsing fix
This commit is contained in:
parent
6684f9bfe8
commit
47e20a2f49
1 changed files with 8 additions and 2 deletions
|
@ -369,7 +369,10 @@ function getHTMLFromAtext(pad, atext, authorColors)
|
||||||
return (item.level === line.listLevel && item.type === line.listTypeName);
|
return (item.level === line.listLevel && item.type === line.listTypeName);
|
||||||
});
|
});
|
||||||
if (!exists) {
|
if (!exists) {
|
||||||
var prevLevel = prevLine.listLevel || 0;
|
var prevLevel = 0;
|
||||||
|
if (prevLine && prevLine.listLevel) {
|
||||||
|
prevlevel = prevLine.listLevel;
|
||||||
|
}
|
||||||
if (prevLine && line.listTypeName !== prevLine.listTypeName)
|
if (prevLine && line.listTypeName !== prevLine.listTypeName)
|
||||||
{
|
{
|
||||||
prevLevel = 0;
|
prevLevel = 0;
|
||||||
|
@ -405,7 +408,10 @@ function getHTMLFromAtext(pad, atext, authorColors)
|
||||||
}
|
}
|
||||||
if ((!nextLine || !nextLine.listLevel || nextLine.listLevel < line.listLevel) || (nextLine && line.listTypeName !== nextLine.listTypeName))
|
if ((!nextLine || !nextLine.listLevel || nextLine.listLevel < line.listLevel) || (nextLine && line.listTypeName !== nextLine.listTypeName))
|
||||||
{
|
{
|
||||||
var nextLevel = nextLine.listLevel || 0;
|
var nextLevel = 0;
|
||||||
|
if (nextLine && nextLine.listLevel) {
|
||||||
|
nextLevel = nextLine.listLevel;
|
||||||
|
}
|
||||||
if (nextLine && line.listTypeName !== nextLine.listTypeName)
|
if (nextLine && line.listTypeName !== nextLine.listTypeName)
|
||||||
{
|
{
|
||||||
nextLevel = 0;
|
nextLevel = 0;
|
||||||
|
|
Loading…
Reference in a new issue