Skip to content

Commit d193233

Browse files
committed
Auto merge of #23250 - liigo:plain-summary-line, r=alexcrichton
this feature was broken by mistake some days ago: @2b11a80 (line 2201: 2b11a80#diff-05c3c8b7c08a25764218b8c18d8204b7L2201) r? @alexcrichton
2 parents 698c100 + 29ff77f commit d193233

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/librustdoc/html/render.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,7 @@ impl Context {
12641264
let short = short.to_string();
12651265
let v = map.entry(short).get().unwrap_or_else(
12661266
|vacant_entry| vacant_entry.insert(Vec::with_capacity(1)));
1267-
v.push((myname, Some(shorter_line(item.doc_value()))));
1267+
v.push((myname, Some(plain_summary_line(item.doc_value()))));
12681268
}
12691269

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

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

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

0 commit comments

Comments
 (0)