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

Rustdoc gets confused with complex link text involving []s #29481

Closed
steveklabnik opened this issue Oct 30, 2015 · 3 comments
Closed

Rustdoc gets confused with complex link text involving []s #29481

steveklabnik opened this issue Oct 30, 2015 · 3 comments
Labels
T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@steveklabnik
Copy link
Member

This might be markdown, it might be rustdoc, it might be both. I haven't determined yet. But links like this don't work:

//! * [`[T; n]`] - An inline *array* with a fixed size at compile time.
//! * [`[T]`] - A dynamically sized *slice* into any other kind of contiguous
//! * [`Box<[T]>`] - *owned slice*
//!
//! [`Box<[T]>`]: boxed/index.html
//! [`[T; n]`]: primitive.array.html
//! [`[T]`]: primitive.slice.html

It would seem [ inside this style of link confuses the parser.

@steveklabnik steveklabnik added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 30, 2015
@steveklabnik
Copy link
Member Author

CommonMark says: http://spec.commonmark.org/0.21/#links

Brackets are allowed in the link text only if (a) they are backslash-escaped or (b) they appear as a matched pair of brackets, with an open bracket [, a sequence of zero or more inlines, and a close bracket ].

so at least in theory, this should Just Work.

steveklabnik added a commit to steveklabnik/rust that referenced this issue Oct 30, 2015
@steveklabnik
Copy link
Member Author

Triage: no change.

@steveklabnik steveklabnik added T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. and removed T-tools labels May 18, 2017
@Mark-Simulacrum
Copy link
Member

As best as I can tell, these work with --enable-commonmark so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants