Skip to content

Commit 56efa35

Browse files
fix: use replaceAll for Windows path normalization in PDF generation
1 parent b8e9d8f commit 56efa35

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

hooks/99_generatePdf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = {
1717
const browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']});
1818
const page = await browser.newPage();
1919
const fullPath = path.resolve(targetDir, 'index.html');
20-
const fileUrl = `file:///${fullPath.replace(/\\/g, '/')}`;
20+
const fileUrl = `file:///${fullPath.replaceAll('\\', '/')}`;
2121
// Go to prepared page with documentation
2222
await page.goto(fileUrl, { waitUntil: 'networkidle0' });
2323

0 commit comments

Comments
 (0)