diff options
author | webzwo0i <webzwo0i@c3d2.de> | 2013-12-08 11:35:28 +0100 |
---|---|---|
committer | webzwo0i <webzwo0i@c3d2.de> | 2013-12-08 11:35:28 +0100 |
commit | 656a558af987c85e173a6e51f2ec11980ff24ec2 (patch) | |
tree | 6a1fddfe7794b2aa3f0e885b2dfdf1c5d9752b63 /src | |
parent | a534b1ec2256afbd1ed13049b2b92f11e0dcce65 (diff) | |
download | etherpad-lite-656a558af987c85e173a6e51f2ec11980ff24ec2.zip |
be more clear about the value in propVals
Diffstat (limited to 'src')
-rw-r--r-- | src/node/utils/ExportHtml.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/node/utils/ExportHtml.js b/src/node/utils/ExportHtml.js index 53e27cc7..b445967e 100644 --- a/src/node/utils/ExportHtml.js +++ b/src/node/utils/ExportHtml.js @@ -251,17 +251,23 @@ function getHTMLFromAtext(pad, atext, authorColors) if (a in anumMap) { 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]) { propVals[i] = ENTER; propChanged = true; } - else + else if(propVals[i] === true) { 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++) { if (propVals[i] === true) |