@@ -1662,8 +1662,13 @@ fn document_full(w: &mut fmt::Formatter, item: &clean::Item) -> fmt::Result {
16621662}
16631663
16641664fn document_stability ( w : & mut fmt:: Formatter , cx : & Context , item : & clean:: Item ) -> fmt:: Result {
1665- for stability in short_stability ( item, cx, true ) {
1666- write ! ( w, "<div class='stability'>{}</div>" , stability) ?;
1665+ let stabilities = short_stability ( item, cx, true ) ;
1666+ if !stabilities. is_empty ( ) {
1667+ write ! ( w, "<div class='stability'>" ) ?;
1668+ for stability in stabilities {
1669+ write ! ( w, "{}" , stability) ?;
1670+ }
1671+ write ! ( w, "</div>" ) ?;
16671672 }
16681673 Ok ( ( ) )
16691674}
@@ -1862,7 +1867,7 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S
18621867 String :: new ( )
18631868 } ;
18641869 let text = format ! ( "Deprecated{}{}" , since, Markdown ( & deprecated_reason) ) ;
1865- stability. push ( format ! ( "<em class='stab deprecated'>{}</em >" , text) )
1870+ stability. push ( format ! ( "<div class='stab deprecated'>{}</div >" , text) )
18661871 } ;
18671872
18681873 if stab. level == stability:: Unstable {
@@ -1887,7 +1892,7 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S
18871892 String :: new ( )
18881893 } ;
18891894 let text = format ! ( "Unstable{}{}" , unstable_extra, Markdown ( & unstable_reason) ) ;
1890- stability. push ( format ! ( "<em class='stab unstable'>{}</em >" , text) )
1895+ stability. push ( format ! ( "<div class='stab unstable'>{}</div >" , text) )
18911896 } ;
18921897 } else if let Some ( depr) = item. deprecation . as_ref ( ) {
18931898 let note = if show_reason && !depr. note . is_empty ( ) {
@@ -1902,7 +1907,7 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S
19021907 } ;
19031908
19041909 let text = format ! ( "Deprecated{}{}" , since, Markdown ( & note) ) ;
1905- stability. push ( format ! ( "<em class='stab deprecated'>{}</em >" , text) )
1910+ stability. push ( format ! ( "<div class='stab deprecated'>{}</div >" , text) )
19061911 }
19071912
19081913 stability
0 commit comments