@@ -1662,8 +1662,13 @@ fn document_full(w: &mut fmt::Formatter, item: &clean::Item) -> fmt::Result {
1662
1662
}
1663
1663
1664
1664
fn 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>" ) ?;
1667
1672
}
1668
1673
Ok ( ( ) )
1669
1674
}
@@ -1862,7 +1867,7 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S
1862
1867
String :: new ( )
1863
1868
} ;
1864
1869
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) )
1866
1871
} ;
1867
1872
1868
1873
if stab. level == stability:: Unstable {
@@ -1887,7 +1892,7 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S
1887
1892
String :: new ( )
1888
1893
} ;
1889
1894
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) )
1891
1896
} ;
1892
1897
} else if let Some ( depr) = item. deprecation . as_ref ( ) {
1893
1898
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
1902
1907
} ;
1903
1908
1904
1909
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) )
1906
1911
}
1907
1912
1908
1913
stability
0 commit comments