mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
be more clear about the value in propVals
This commit is contained in:
parent
a534b1ec22
commit
656a558af9
1 changed files with 8 additions and 2 deletions
|
@ -251,17 +251,23 @@ function getHTMLFromAtext(pad, atext, authorColors)
|
||||||
if (a in anumMap)
|
if (a in anumMap)
|
||||||
{
|
{
|
||||||
var i = anumMap[a]; // i = 0 => bold, etc.
|
var i = anumMap[a]; // i = 0 => bold, etc.
|
||||||
|
|
||||||
|
//true branch: if false or undefined or LEAVE set ENTER and propChanged
|
||||||
|
//false branch: if its true (the tag was opened in one of previous op) set it STAY
|
||||||
if (!propVals[i])
|
if (!propVals[i])
|
||||||
{
|
{
|
||||||
propVals[i] = ENTER;
|
propVals[i] = ENTER;
|
||||||
propChanged = true;
|
propChanged = true;
|
||||||
}
|
}
|
||||||
else
|
else if(propVals[i] === true)
|
||||||
{
|
{
|
||||||
propVals[i] = STAY;
|
propVals[i] = STAY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}); // now all attribs of this op have been parsed
|
||||||
|
|
||||||
|
// if an attrib is no longer used in this op but was used in the previous set it to LEAVE
|
||||||
|
// otherwise if its STAY(was previously open and still is) set it true
|
||||||
for (var i = 0; i < propVals.length; i++)
|
for (var i = 0; i < propVals.length; i++)
|
||||||
{
|
{
|
||||||
if (propVals[i] === true)
|
if (propVals[i] === true)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue