diff --git a/packages/remark-cq/index.js b/packages/remark-cq/index.js index 4f6d2dd..04c977d 100644 --- a/packages/remark-cq/index.js +++ b/packages/remark-cq/index.js @@ -154,6 +154,10 @@ function codeImportBlock(eat, value, silent) { if (__lastBlockAttributes["lang"]) { cqOpts.language = dequote(__lastBlockAttributes["lang"]); } + if (__lastBlockAttributes["gap-filler"]) { + cqOpts.gapFiller = + "\n " + dequote(__lastBlockAttributes["gap-filler"]) + "\n"; + } let newNode = { type: "cq", @@ -446,6 +450,9 @@ async function visitCq(ast, vFile, options) { if (!cqOpts.engine) { cqOpts.engine = engine; } + if (!cqOpts.gapFiller) { + cqOpts.gapFiller = "\n // ...\n"; + } debug(`${actualFilename} ` + JSON.stringify(cqOpts, null, 2)); let results;