Skip to content
This repository was archived by the owner on Feb 6, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ exports.exportHtmlAdditionalTags = function(hook, pad, cb){
};

// line, apool,attribLine,text
exports.getLineHTMLForExport = function (hook, line) {
var contextV = _analyzeLine(line.attribLine, line.apool);
exports.getLineHTMLForExport = function (hook, context) {
var contextV = _analyzeLine(context.attribLine, context.apool);

// If it has a context
if(contextV){
var contexts = contextV.split("$");
}else{
return line.lineContent + "<br>";
context.lineContent = context.lineContent + "<br>";
return true;
}

var before = "";
Expand Down Expand Up @@ -77,10 +78,12 @@ exports.getLineHTMLForExport = function (hook, line) {
after += "</p>";
});
// Remove leading * else don't..
var newString = before + line.lineContent.substring(1) + after + "<br>";
return newString;
}else{ // no context, nothing to remove
return line.lineContent;
if (context.lineContent[0] === '*') {
context.lineContent = context.lineContent.substring(1)
}

context.lineContent = before + context.lineContent + after + "<br>";
return true;
}
}

Expand Down