diff --git a/src/node/utils/ExportHtml.js b/src/node/utils/ExportHtml.js index bd177ac47..13140bb58 100644 --- a/src/node/utils/ExportHtml.js +++ b/src/node/utils/ExportHtml.js @@ -356,7 +356,15 @@ function getHTMLFromAtext(pad, atext, authorColors) } } } - + var context = { + line: line, + lineContent: lineContent, + apool: apool, + attribLine: attribLines[i], + text: textLines[i], + padId: pad.id + } + var lineContentFromHook = hooks.callAll("getLineHTMLForExport", context); if (whichList >= lists.length)//means we are on a deeper level of indentation than the previous line { if(lists.length > 0){ @@ -373,14 +381,14 @@ function getHTMLFromAtext(pad, atext, authorColors) if(toOpen > 0){ pieces.push(new Array(toOpen + 1).join('
    ')) } - pieces.push('
    1. ', lineContent || '
      '); + pieces.push('
      1. ', context.lineContent || '
        '); } else { if(toOpen > 0){ pieces.push(new Array(toOpen + 1).join('
          ')) } - pieces.push('
          • ', lineContent || '
            '); + pieces.push('
            • ', context.lineContent || '
              '); } } //the following code *seems* dead after my patch. @@ -416,16 +424,16 @@ function getHTMLFromAtext(pad, atext, authorColors) if(lists[lists.length - 1][1] == "number") { pieces.push(new Array(toClose+1).join('
      ')) - pieces.push('
    2. ', lineContent || '
      '); + pieces.push('
    3. ', context.lineContent || '
      '); } else { pieces.push(new Array(toClose+1).join('')) - pieces.push('
    4. ', lineContent || '
      '); + pieces.push('
    5. ', context.lineContent || '
      '); } lists = lists.slice(0,whichList+1) } else { - pieces.push('
    6. ', lineContent || '
      '); + pieces.push('
    7. ', context.lineContent || '
      '); } } } @@ -451,16 +459,9 @@ function getHTMLFromAtext(pad, atext, authorColors) padId: pad.id } - var lineContentFromHook = hooks.callAllStr("getLineHTMLForExport", context, " ", " ", ""); + hooks.callAll("getLineHTMLForExport", context); - if (lineContentFromHook) - { - pieces.push(lineContentFromHook, ''); - } - else - { - pieces.push(lineContent, '
      '); - } + pieces.push(context.lineContent, '
      '); } }