Skip to content

Commit

Permalink
Auto merge of #23250 - liigo:plain-summary-line, r=alexcrichton
Browse files Browse the repository at this point in the history
this feature was broken by mistake some days ago: @2b11a80
(line 2201: 2b11a80#diff-05c3c8b7c08a25764218b8c18d8204b7L2201)

r? @alexcrichton
  • Loading branch information
bors committed Mar 10, 2015
2 parents 698c100 + 29ff77f commit d193233
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ impl Context {
let short = short.to_string();
let v = map.entry(short).get().unwrap_or_else(
|vacant_entry| vacant_entry.insert(Vec::with_capacity(1)));
v.push((myname, Some(shorter_line(item.doc_value()))));
v.push((myname, Some(plain_summary_line(item.doc_value()))));
}

for (_, items) in &mut map {
Expand Down Expand Up @@ -1478,8 +1478,9 @@ fn shorter<'a>(s: Option<&'a str>) -> &'a str {
}

#[inline]
fn shorter_line(s: Option<&str>) -> String {
shorter(s).replace("\n", " ")
fn plain_summary_line(s: Option<&str>) -> String {
let line = shorter(s).replace("\n", " ");
markdown::plain_summary_line(&line[..])
}

fn document(w: &mut fmt::Formatter, item: &clean::Item) -> fmt::Result {
Expand Down

0 comments on commit d193233

Please sign in to comment.