diff --git a/src/scripts/builders/reference.ts b/src/scripts/builders/reference.ts index 5d785ee9a1..cb9fc1ad45 100644 --- a/src/scripts/builders/reference.ts +++ b/src/scripts/builders/reference.ts @@ -292,7 +292,16 @@ const convertToMDX = async ( try { // Add YAML comment to the frontmatter - const comment = `# This file was auto-generated. Please do not edit it manually!\n# To make changes, edit the comments in the corresponding source file:\n# https://github.com/processing/p5.js/blob/v${p5Version}/${doc.file.replace(/\\/g, '/')}#L${doc.line}`; + const repo = + doc.module === "p5.sound" + ? "processing/p5.sound" + : "processing/p5.js"; + +const comment = + `# This file was auto-generated. Please do not edit it manually!\n` + + `# To make changes, edit the comments in the corresponding source file:\n` + + `# https://github.com/${repo}/blob/v${p5Version}/${doc.file.replace(/\\/g, '/') }#L${doc.line}`; + // Convert the frontmatter to a string const frontmatter = matter.stringify("", frontMatterArgs);