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

Prefer [foo][bar] over [foo](bar) for intra-doc links #3191

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

daxpedda
Copy link
Member

@daxpedda daxpedda commented Oct 25, 2023

Follow-up to a discussion here: #3178 (comment).

The logic here is that [foo](bar) can be used for inline links or intra-doc links, but [foo][bar] can be used for labels or intra-doc links, so if no label is present, it can only be a intra-doc link, making this less ambiguous and more robust to error check.

@daxpedda daxpedda added the S - docs Awareness, docs, examples, etc. label Oct 25, 2023
@daxpedda daxpedda removed the request for review from msiglreith October 25, 2023 15:53
Copy link
Member

@notgull notgull left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@daxpedda
Copy link
Member Author

daxpedda commented Nov 9, 2023

For reference: still waiting for some feedback in rust-lang/rust#117178.

@kchibisov kchibisov marked this pull request as draft January 30, 2024 11:09
@kchibisov kchibisov added the C - upstream It's not our fault for once label Jan 30, 2024
@daxpedda
Copy link
Member Author

Apparently the conclusion was that there is no preference: rust-lang/rust#121021.

I also double checked and AFAICT Rustdoc will properly generate an error regardless. So the only difference is that []() will generate a dead link but [][] will not, but its not really an issue because CI should always catch it.

Personally I would still prefer [foo][bar] over [foo](bar) despite there not being any official recommendation by Rustdoc but us being consistent in Winit. So if we have consensus I would still like to move forward with this.

@daxpedda daxpedda added this to the Version 0.30.0 milestone Feb 14, 2024
Copy link
Member

@madsmtm madsmtm left a comment

Choose a reason for hiding this comment

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

Am fine with either

@daxpedda daxpedda marked this pull request as ready for review March 16, 2024 09:13
@daxpedda daxpedda merged commit baf10de into rust-windowing:master Mar 16, 2024
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - upstream It's not our fault for once S - docs Awareness, docs, examples, etc.
Development

Successfully merging this pull request may close these issues.

None yet

5 participants