@@ -698,7 +698,7 @@ fn build_index(krate: &clean::Crate, cache: &mut Cache) -> String {
698698 ty : item. type_ ( ) ,
699699 name : item. name . clone ( ) . unwrap ( ) ,
700700 path : fqp[ ..fqp. len ( ) - 1 ] . join ( "::" ) ,
701- desc : plain_summary_line ( item. doc_value ( ) ) ,
701+ desc : plain_summary_line_short ( item. doc_value ( ) ) ,
702702 parent : Some ( did) ,
703703 parent_idx : None ,
704704 search_type : get_index_search_type ( & item) ,
@@ -736,7 +736,7 @@ fn build_index(krate: &clean::Crate, cache: &mut Cache) -> String {
736736 }
737737
738738 let crate_doc = krate. module . as_ref ( ) . map ( |module| {
739- plain_summary_line ( module. doc_value ( ) )
739+ plain_summary_line_short ( module. doc_value ( ) )
740740 } ) . unwrap_or ( String :: new ( ) ) ;
741741
742742 let mut crate_data = BTreeMap :: new ( ) ;
@@ -1487,7 +1487,7 @@ impl DocFolder for Cache {
14871487 ty : item. type_ ( ) ,
14881488 name : s. to_string ( ) ,
14891489 path : path. join ( "::" ) ,
1490- desc : plain_summary_line ( item. doc_value ( ) ) ,
1490+ desc : plain_summary_line_short ( item. doc_value ( ) ) ,
14911491 parent,
14921492 parent_idx : None ,
14931493 search_type : get_index_search_type ( & item) ,
@@ -1679,7 +1679,7 @@ impl<'a> Cache {
16791679 ty : item. type_ ( ) ,
16801680 name : item_name. to_string ( ) ,
16811681 path : path. clone ( ) ,
1682- desc : plain_summary_line ( item. doc_value ( ) ) ,
1682+ desc : plain_summary_line_short ( item. doc_value ( ) ) ,
16831683 parent : None ,
16841684 parent_idx : None ,
16851685 search_type : get_index_search_type ( & item) ,
@@ -2396,7 +2396,13 @@ fn shorter<'a>(s: Option<&'a str>) -> String {
23962396#[ inline]
23972397fn plain_summary_line ( s : Option < & str > ) -> String {
23982398 let line = shorter ( s) . replace ( "\n " , " " ) ;
2399- markdown:: plain_summary_line ( & line[ ..] )
2399+ markdown:: plain_summary_line_full ( & line[ ..] , false )
2400+ }
2401+
2402+ #[ inline]
2403+ fn plain_summary_line_short ( s : Option < & str > ) -> String {
2404+ let line = shorter ( s) . replace ( "\n " , " " ) ;
2405+ markdown:: plain_summary_line_full ( & line[ ..] , true )
24002406}
24012407
24022408fn document ( w : & mut fmt:: Formatter , cx : & Context , item : & clean:: Item ) -> fmt:: Result {
0 commit comments