Skip to content

prevent double-slash in asset paths (//assets/ --> /assets/) #925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 2.0
Choose a base branch
from

Conversation

perminder-17
Copy link
Contributor

Resolves #912

I also build the reference again in the website, and commited the regenerated MDX, and included those files in the PR as well.

@perminder-17 perminder-17 linked an issue Aug 3, 2025 that may be closed by this pull request
@ksen0
Copy link
Member

ksen0 commented Aug 5, 2025

Hi @perminder-17 , thanks for this, it looks good. OK to merge!

Not sure if you've come across it, but FYI there's a related, but not quite duplicate (on main not 2.0, and about absolute not relative links), is #878 (see also the comment on that PR)

@@ -161,8 +161,8 @@ const correctRelativeLinksToExampleAssets = (
return content;
}
return Array.isArray(content)
? content.map((ex) => ex.replaceAll("assets/", "/assets/").replaceAll(/\n$/g, ""))
: content.replaceAll("assets/", "/assets/");
? content.map((ex) => ex.replaceAll(/(?<!\/)assets\//g, "/assets/").replaceAll(/\n$/g, ""))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typo in Example Code - textToContours()
2 participants