p5.js-website icon indicating copy to clipboard operation
p5.js-website copied to clipboard

Fix #878 : prevent trailing slashes on absolute Wikipedia URLs

Open reshma045 opened this issue 5 months ago • 3 comments

Summary: This PR fixes the issue where absolute Wikipedia URLs in the generated reference docs had unwanted trailing slashes.

Closes #878

What was done:

  1. Modified src/scripts/builders/reference.ts to add a check preventing trailing slashes on absolute URLs (URLs starting with http)
  2. Ran npm run build:reference to regenerate the reference documentation files
  3. Verified that Wikipedia links no longer contain trailing slashes and work correctly
  4. Verified that no changes were made to package-lock.json

Thanks to the maintainers for the guidance!

reshma045 avatar Aug 12 '25 07:08 reshma045

@reshma045 There are way too many unintended changes here. There should only be changes to src/scripts/builders/reference.ts and the relevant built wikipedia links but it seems all the slashes in the repo has been changed to backslashes here which will likely break a lot of things.

@reshma045 If you need help or more direct guidance please let me know. It's better that you ask us than to continue iterating if you are not sure what the specific changes required are.

limzykenneth avatar Aug 12 '25 09:08 limzykenneth

@reshma045 it looks like you're not reviewing your own changes (packages downgraded on previous PR, slashes here). That would be a good habit to practice before you make a commit and before making a PR.

blackboxlogic avatar Aug 12 '25 09:08 blackboxlogic

@reshma045 There are way too many unintended changes here. There should only be changes to src/scripts/builders/reference.ts and the relevant built wikipedia links but it seems all the slashes in the repo has been changed to backslashes here which will likely break a lot of things.

My apologies, but those 1000+ file changes were a result of npm run build:reference. But I'll do my best to learn from this and correct it. Thanks

reshma045 avatar Aug 13 '25 04:08 reshma045