Skip to content
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

Docs: Fix parentheses in Markdown link URL #61675

Closed
wants to merge 1 commit into from

Conversation

sirreal
Copy link
Member

@sirreal sirreal commented May 15, 2024

What?

Parentheses in Markdown link URLs can be confusing, some tooling will attempt to fix them (prettier/prettier#15340):

Original: ['minifies'](https://en.wikipedia.org/wiki/Minification_(programming))
"fixed": ['minifies'](<https://en.wikipedia.org/wiki/Minification_(programming)>)

I believe both formats are technically valid, but the simplest fix is to URL encode the parens like this page recommends:

Parentheses in the middle of a URL can also be problematic. For compatibility, try to URL encode the opening parenthesis (() with %28 and the closing parenthesis ()) with %29.

I've applied that suggestion here.

Extracted from #61486 (my editor ran prettier and "fixed" the link).

Why?

The markdown link is more likely to be treated correctly by all markdown parsers.

Testing Instructions

Look at the rendered markdown in the diff and confirm the link works correctly.

Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: sirreal <jonsurrell@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@sirreal sirreal requested a review from gziolo June 17, 2024 21:03
@sirreal sirreal force-pushed the fix/feature-flags-parens-in-markdown branch from 9faf6e4 to ca61faf Compare June 18, 2024 06:51
@sirreal sirreal closed this Jun 28, 2024
@sirreal sirreal deleted the fix/feature-flags-parens-in-markdown branch June 28, 2024 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
1 participant