@@ -1655,8 +1655,13 @@ fn document_full(w: &mut fmt::Formatter, item: &clean::Item) -> fmt::Result {
1655
1655
}
1656
1656
1657
1657
fn document_stability ( w : & mut fmt:: Formatter , cx : & Context , item : & clean:: Item ) -> fmt:: Result {
1658
- for stability in short_stability ( item, cx, true ) {
1659
- write ! ( w, "<div class='stability'>{}</div>" , stability) ?;
1658
+ let stabilities = short_stability ( item, cx, true ) ;
1659
+ if !stabilities. is_empty ( ) {
1660
+ write ! ( w, "<div class='stability'>" ) ?;
1661
+ for stability in stabilities {
1662
+ write ! ( w, "{}" , stability) ?;
1663
+ }
1664
+ write ! ( w, "</div>" ) ?;
1660
1665
}
1661
1666
Ok ( ( ) )
1662
1667
}
@@ -1855,7 +1860,7 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S
1855
1860
String :: new ( )
1856
1861
} ;
1857
1862
let text = format ! ( "Deprecated{}{}" , since, Markdown ( & deprecated_reason) ) ;
1858
- stability. push ( format ! ( "<em class='stab deprecated'>{}</em >" , text) )
1863
+ stability. push ( format ! ( "<div class='stab deprecated'>{}</div >" , text) )
1859
1864
} ;
1860
1865
1861
1866
if stab. level == stability:: Unstable {
@@ -1880,7 +1885,7 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S
1880
1885
String :: new ( )
1881
1886
} ;
1882
1887
let text = format ! ( "Unstable{}{}" , unstable_extra, Markdown ( & unstable_reason) ) ;
1883
- stability. push ( format ! ( "<em class='stab unstable'>{}</em >" , text) )
1888
+ stability. push ( format ! ( "<div class='stab unstable'>{}</div >" , text) )
1884
1889
} ;
1885
1890
} else if let Some ( depr) = item. deprecation . as_ref ( ) {
1886
1891
let note = if show_reason && !depr. note . is_empty ( ) {
@@ -1895,7 +1900,7 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S
1895
1900
} ;
1896
1901
1897
1902
let text = format ! ( "Deprecated{}{}" , since, Markdown ( & note) ) ;
1898
- stability. push ( format ! ( "<em class='stab deprecated'>{}</em >" , text) )
1903
+ stability. push ( format ! ( "<div class='stab deprecated'>{}</div >" , text) )
1899
1904
}
1900
1905
1901
1906
stability
0 commit comments