Handle filenames with whitespaces in the RFC book (#115)

With a recent PR that has spaces in the RFC filename, the RFC book
generation script started failing - this fixes it.
This commit is contained in:
Przemek Rzad
2024-08-20 12:05:12 +02:00
committed by GitHub
parent f6ec2f8a8b
commit ccbe03ed54
+3 -1
View File
@@ -26,7 +26,9 @@ module.exports = async ({github, context}) => {
}
// Relative path, without the src prefix (format required by mdbook)
const relativePath = filePath.replace("mdbook/src/", "")
fs.appendFileSync(summaryPath, `- [${title}](${relativePath})\n`)
// Wrapping the path allows for whitespaces in the filename.
const target = `<${relativePath}>`
fs.appendFileSync(summaryPath, `- [${title}](${target})\n`)
}
}