diff options
| author | mitaa <mitaa.ceb@gmail.com> | 2016-02-26 17:39:37 +0100 |
|---|---|---|
| committer | mitaa <mitaa.ceb@gmail.com> | 2016-02-27 06:42:30 +0100 |
| commit | 0b3bc9b5e29ba867172120361fb32716fdb99e30 (patch) | |
| tree | f5c83e8f4c2a5b24f9460ac2a278977c9da78b79 /src | |
| parent | 2352c1c5396681230d5ea5c99944e65ab673c3c8 (diff) | |
| download | rust-0b3bc9b5e29ba867172120361fb32716fdb99e30.tar.gz rust-0b3bc9b5e29ba867172120361fb32716fdb99e30.zip | |
Correct plain-summary-line
For plaintext we don't actually need to render the Markdown before shortening the string. (and this may have led to wrong output)
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/html/render.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index d7100f9f220..af6dec8dc86 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1657,8 +1657,8 @@ fn shorter<'a>(s: Option<&'a str>) -> String { #[inline] fn plain_summary_line(s: Option<&str>) -> String { - let md = markdown::plain_summary_line(s.unwrap_or("")); - shorter(Some(&md)).replace("\n", " ") + let line = shorter(s).replace("\n", " "); + markdown::plain_summary_line(&line[..]) } fn document(w: &mut fmt::Formatter, cx: &Context, item: &clean::Item) -> fmt::Result { |
