single-file-core 1.5.119 → 1.5.120

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/index.js CHANGED
@@ -530,6 +530,10 @@ class Processor {
530
530
  " \n url: " + infobarURL +
531
531
  (this.options.removeSavedDate ? " " : " \n saved date: " + infobarSaveDate) +
532
532
  (infobarContent ? " \n info: " + infobarContent : "") + "\n";
533
+ // the infobar template resolves {page-title} and its kind against the captured page, so
534
+ // this text can carry "-->" and close the comment early, turning the rest into markup.
535
+ // A comment cannot escape its own delimiters, so the run is broken with a space
536
+ commentText = commentText.replace(/--(!?)>/g, "--$1 >");
533
537
  const commentNode = this.doc.createComment(commentText);
534
538
  this.doc.documentElement.insertBefore(commentNode, this.doc.documentElement.firstChild);
535
539
  }