浏览代码

[fix] Use replaceAll instead of replace

jherve 1 年之前
父节点
当前提交
e26e73ff70
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      to_pdf.js

+ 1 - 1
to_pdf.js

@@ -41,7 +41,7 @@ function exportToPdf(htmlFile, pdfPath) {
 }
 
 function cleanString(string) {
-  return string.replace(" ", "_");
+  return string.replaceAll(" ", "_");
 }
 
 function exportRenderToPdf(dataFilePath, templatePath, assetsPath, outputPath) {