|
|
|
|
@ -33,11 +33,8 @@ module.exports = function(input, callback){
|
|
|
|
|
var current_line_num_tabs = tabs_array.length - 1;
|
|
|
|
|
if(current_line_num_tabs > previous_line_num_tabs){
|
|
|
|
|
html += insertTabs(current_line_num_tabs * 2) + '<ul>\n';
|
|
|
|
|
html_stack.push( insertTabs(current_line_num_tabs * 2) + '</ul>\n');
|
|
|
|
|
} else if (current_line_num_tabs === previous_line_num_tabs) {
|
|
|
|
|
html += html_stack.pop();
|
|
|
|
|
}
|
|
|
|
|
else if(current_line_num_tabs < previous_line_num_tabs){
|
|
|
|
|
html_stack.push(insertTabs(current_line_num_tabs * 2) + '</ul>\n');
|
|
|
|
|
} else {
|
|
|
|
|
html += popHTMLStack(current_line_num_tabs, previous_line_num_tabs);
|
|
|
|
|
}
|
|
|
|
|
html += insertTabs((current_line_num_tabs * 2) + 1) + '<li>\n';
|
|
|
|
|
|