From 656a558af987c85e173a6e51f2ec11980ff24ec2 Mon Sep 17 00:00:00 2001 From: webzwo0i Date: Sun, 8 Dec 2013 11:35:28 +0100 Subject: be more clear about the value in propVals --- src/node/utils/ExportHtml.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') 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) -- cgit v1.2.3