Skip to content

Conversation

@killercup
Copy link
Contributor

The first paragraph of the docs of the Cursor struct (src) contains a Markdown link. In listings (like http://doc.rust-lang.org/nightly/std/io/), this won't get rendered:

std__io_-_rust

The hotfix would be to change the link by reference:

/// A `Cursor` wraps another type and provides it with a [`Seek`][seek]
/// implementation.
///
/// [seek]: trait.Seek.html

to a direct link:

/// A `Cursor` wraps another type and provides it with a
/// [`Seek`](trait.Seek.html) implementation.

I have not tested this as I don't have access to a machine for compiling Rust right now.

(This seems to be a more general issue, but I think I have seen this mentioned before. This PR is just to hotfix on particular occurrence. Rustdoc seems to only read the first paragraph of a doc string for the description in index pages, and after that convert Markdown to HTML.)

r? @steveklabnik

The first paragraph of the docs of the Cursor struct contains a Markdown
link. In listings, this won't get rendered. (Rustdoc seems to split off the
first paragraph and after that convert Markdown to HTML.)
@alexcrichton
Copy link
Member

@bors: r+ 8c6ec5d rollup

This is a bug in rustdoc I feel like we should definitely fix, but I'm totally ok with this for now.

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Jul 29, 2015
The first paragraph of the docs of the Cursor struct ([src](https://github.com/rust-lang/rust/blob/ff6c6ce917bd6af9c5d9315708ae6be3ba0b7e91/src/libstd/io/cursor.rs#L18-L21)) contains a Markdown link. In listings (like <http://doc.rust-lang.org/nightly/std/io/>), this won't get rendered:

![std__io_-_rust](https://cloud.githubusercontent.com/assets/20063/8925843/5c5281a8-350b-11e5-8c63-09a369d746b0.png)

The hotfix would be to change the link by reference:

```rust
/// A `Cursor` wraps another type and provides it with a [`Seek`][seek]
/// implementation.
///
/// [seek]: trait.Seek.html
```

to a direct link:

```rust
/// A `Cursor` wraps another type and provides it with a
/// [`Seek`](trait.Seek.html) implementation.
```

_I have not tested this as I don't have access to a machine for compiling Rust right now._

(This seems to be a more general issue, but I think I have seen this mentioned before. This PR is just to hotfix on particular occurrence. Rustdoc seems to only read the first paragraph of a doc string for the description in index pages, and _after that_ convert Markdown to HTML.)

r? @steveklabnik
bors added a commit that referenced this pull request Jul 29, 2015
@bors bors merged commit 8c6ec5d into rust-lang:master Jul 29, 2015
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.

4 participants