rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
96.86k stars 12.51k forks source link

Rustdoc should only end the 1st sentence at a `.` that is followed by a space. #8617

Closed orenbenkiki closed 10 years ago

orenbenkiki commented 11 years ago

For example, if the 1st sentence is "This is the foo library version 1.0 which does good stuff.", rustdoc will incorrectly consider the 1st sentence to be "This is the foo library version 1.".

huonw commented 11 years ago

(I assume you meant that it should only end when the . is followed by a space; I amended the title to change ... is not followed ... :) )

Part of https://github.com/mozilla/rust/issues/8125. (@cmr, @Seldaek, any input?)

Seldaek commented 11 years ago

Right now rustdoc_web (the new docs) makes the cut between short description and the rest of the docblock at the first \n\n. The reason is that many functions have two sentence one-liner descriptions and splitting those really doesn't make sense IMO, but it's an easy fix if it's deemed that splitting at the first sentence boundary is better.

alexcrichton commented 10 years ago

This is no longer relevant with rustdoc_ng. The detection of \n\n was implemented, and it appears to be working ok.

This can certainly be reopened if it's still a problem.