Skip to content

Commit

Permalink
Handle filenames with whitespaces in the RFC book (#115)
Browse files Browse the repository at this point in the history
With a recent PR that has spaces in the RFC filename, the RFC book
generation script started failing - this fixes it.
  • Loading branch information
rzadp authored Aug 20, 2024
1 parent f6ec2f8 commit ccbe03e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/scripts/build-mdbook-summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
}
}

Expand Down

0 comments on commit ccbe03e

Please sign in to comment.