From f5716a3b2600a34623901952d825dfeaa1621691 Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 5 Mar 2014 21:44:32 +0000 Subject: [PATCH] cleaner logic --- src/static/js/domline.js | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/src/static/js/domline.js b/src/static/js/domline.js index 8756a285..b1927b16 100644 --- a/src/static/js/domline.js +++ b/src/static/js/domline.js @@ -119,13 +119,8 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument) { if(listType.indexOf("number") < 0) { - if(!preHtml){ - preHtml = ''; - }else{ - preHtml += '' + postHtml; - } + preHtml += '' + postHtml; } else { @@ -133,23 +128,11 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument) if(start[1] == 1){ // if its the first one at this level? lineClass = lineClass + " " + "list-start-" + listType; // Add start class to DIV node } - if(!preHtml){ - preHtml = '
  1. '; - }else{ - preHtml += '
    1. '; - } + preHtml += '
      1. '; }else{ - if(!preHtml){ - preHtml = '
        1. '; // Handles pasted contents into existing lists - }else{ - preHtml += '
          1. '; // Handles pasted contents into existing lists - } - } - if(!postHtml){ - postHtml = '
          '; - }else{ - postHtml = '
        '; + preHtml += '
        1. '; // Handles pasted contents into existing lists } + postHtml += '
        '; } } processedMarker = true;