Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix broken links on contribute sections#956

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
junseok44 wants to merge4 commits intoprocessing:main
base:main
Choose a base branch
Loading
fromjunseok44:fix-markdown-relative-links-support

Conversation

@junseok44
Copy link
Contributor

@junseok44junseok44 commentedSep 6, 2025
edited
Loading

Related to#527

This PR resolves broken links on:

https://p5js.org/contribute/friendly_error_system/

https://p5js.org/contribute/steward_guidelines/

What this PR does

  • Adds support for reference-style links: FixedrewriteRelativeMdLinks function which previously only handled inline links but not reference-style markdown links
  • Corrects misleading comment: Updated comment forinlineLinkRegexPattern to accurately describe what it captures
  • Fixes hash fragment handling: Resolved issue where.md extension wasn't being removed from relative links when followed by hash fragments (e.g.,file.md#section)

What this PR does not address

  • Pre-existing malformed links: Links without proper relative paths (e.g.,[Issues](steward_guidelines.md#issues)) still result in incorrect URLs due to the../ prefix being added by existing logic. These were already broken before this PR.
  • Typos in source content: The broken link [_fesErrorMonitor()] on the friendly error system page is a typo in the source documentation from the p5.js repository. This will be addressed in a separate PR to the main p5.js repo.

ksen0 reacted with eyes emoji
junseok44and others added4 commitsSeptember 6, 2025 19:52
- Extend rewriteRelativeMdLinks to handle reference link syntax- Support both inline links and reference links for markdown files- Maintain backward compatibility with existing inline link processing
- Replace endsWith() with includes() to detect .md files with hash fragments- Use lookahead regex to avoid breaking .mdx and other extensions- Properly convert links like 'file.md#section' to 'file/#section'
- Add comprehensive test for reference link syntax processing- Verify both inline and reference links are handled correctly- Test hash fragment preservation in reference links
Copy link
Contributor

@lirenjie95lirenjie95 left a comment

Choose a reason for hiding this comment

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

Thank for provide the fix and related unit test!

junseok44 reacted with heart emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@lirenjie95lirenjie95lirenjie95 approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@junseok44@lirenjie95@ksen0

[8]ページ先頭

©2009-2025 Movatter.jp