working, might need polish its pretty late
parent
9abb85799c
commit
1890ba3976
|
@ -411,31 +411,26 @@ function getHTMLFromAtext(pad, atext, authorColors)
|
||||||
}
|
}
|
||||||
lists = []
|
lists = []
|
||||||
|
|
||||||
hooks.aCallAll("asyncLineHTMLForExport", {
|
var context = {
|
||||||
line: line,
|
line: line,
|
||||||
lineContent: lineContent,
|
lineContent: lineContent,
|
||||||
apool: apool,
|
apool: apool,
|
||||||
attribLine: attribLines[i],
|
attribLine: attribLines[i],
|
||||||
text: textLines[i]
|
text: textLines[i]
|
||||||
}, function(err, newLineContent){
|
}
|
||||||
//new Line Content is an array of each of the responses from aCallAll.. We should return a function to it
|
|
||||||
console.error(newLineContent);
|
// first context below seems superfluos
|
||||||
if(newLineContent.length !== 0){
|
hooks.aCallAll("asyncLineHTMLForExport", context, function(err, newLineFunction){
|
||||||
console.error("lC", newLineContent[0]);
|
newLineFunction.forEach(function(fn){
|
||||||
lineContent = newLineContent[0];
|
context.lineContent = fn(context); // note the fn
|
||||||
}
|
});
|
||||||
// modified lineContent here
|
//new Line Content is an array of each of the responses from aCallAll..
|
||||||
|
// We should return a function to it
|
||||||
|
lineContent = context.lineContent; // modified lineContent here
|
||||||
});
|
});
|
||||||
|
|
||||||
// Old hook probably not to be used..
|
// Old hook probably not to be used..
|
||||||
var lineContentFromHook = hooks.callAllStr("getLineHTMLForExport",
|
var lineContentFromHook = hooks.callAllStr("getLineHTMLForExport", context, " ", " ", "");
|
||||||
{
|
|
||||||
line: line,
|
|
||||||
lineContent: lineContent,
|
|
||||||
apool: apool,
|
|
||||||
attribLine: attribLines[i],
|
|
||||||
text: textLines[i]
|
|
||||||
}, " ", " ", "");
|
|
||||||
|
|
||||||
if (lineContentFromHook)
|
if (lineContentFromHook)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue