alanshaw/markdown-pdf

Can I get the file name but not only file content in preProcessMd?

YuunYang opened this issue · 1 comments

Here is my code, I wanna to get the path or file name here

function preProcessMd() { // or here ?
  return through (function (data, ...args) {
    console.log(args);
    pageBreak = '\n\n<div style="page-break-before: always;"></div>\n\n';
    this.queue(loadNunjucks(data) + pageBreak);
  });
}

Hi @YuunYang Did you ever figure this out on your own? I'm trying to implement the same thing, and finding myself stuck too.