From 4d6ce04e8c4d221857466cd4dcb3f0b6ce2e7490 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Fri, 22 Jan 2016 10:52:32 -0500 Subject: [PATCH] start with ul, not li --- index.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 74ca072..98642b1 100755 --- a/index.js +++ b/index.js @@ -34,13 +34,20 @@ var parseFile = function(data, callback){ var split_value = value.split('\t'); var num_tabs = split_value.length - 1; if(num_tabs > previous_line){ - html += '\n' + insertTabs(num_tabs * 2) +'
  • \n' + insertTabs(num_tabs * 2 + 1) + '\n' + insertTabs(num_tabs * 2) + '
  • '); + if(num_tabs > 0){ + html += '\n' + insertTabs(num_tabs * 2 - 1) +'
  • \n'; + } + html += insertTabs(num_tabs * 2) + ''; + if(num_tabs > 0){ + html_push_string += '\n' + insertTabs(num_tabs * 2 - 1) + '
  • '; + } + tabStack.push(html_push_string); } else if(num_tabs < previous_line){ html += popTabStack(tabStack, num_tabs, previous_line); } - html += '\n' + insertTabs(num_tabs * 2 + 2) + + html += '\n' + insertTabs(num_tabs * 2 + 1) + '
  • ' + split_value[split_value.length - 1] + '
  • '; previous_line = num_tabs; }