@@ -140,10 +140,8 @@ macro_rules! item_template_methods {
140140 } ;
141141}
142142
143- const ITEM_TABLE_OPEN : & str = "<ul class=\" item-table\" >" ;
144- const ITEM_TABLE_CLOSE : & str = "</ul>" ;
145- const ITEM_TABLE_ROW_OPEN : & str = "<li>" ;
146- const ITEM_TABLE_ROW_CLOSE : & str = "</li>" ;
143+ const ITEM_TABLE_OPEN : & str = "<dl class=\" item-table\" >" ;
144+ const ITEM_TABLE_CLOSE : & str = "</dl>" ;
147145
148146// A component in a `use` path, like `string` in std::string::ToString
149147struct PathComponent {
@@ -413,32 +411,29 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
413411 clean:: ExternCrateItem { ref src } => {
414412 use crate :: html:: format:: anchor;
415413
416- w. write_str ( ITEM_TABLE_ROW_OPEN ) ;
417414 match * src {
418415 Some ( src) => write ! (
419416 w,
420- "<div class=\" item-name\" ><code>{}extern crate {} as {};" ,
417+ "<dt class=\" item-name\" ><code>{}extern crate {} as {};" ,
421418 visibility_print_with_space( myitem, cx) ,
422419 anchor( myitem. item_id. expect_def_id( ) , src, cx) ,
423420 EscapeBodyTextWithWbr ( myitem. name. unwrap( ) . as_str( ) ) ,
424421 ) ,
425422 None => write ! (
426423 w,
427- "<div class=\" item-name\" ><code>{}extern crate {};" ,
424+ "<dt class=\" item-name\" ><code>{}extern crate {};" ,
428425 visibility_print_with_space( myitem, cx) ,
429426 anchor( myitem. item_id. expect_def_id( ) , myitem. name. unwrap( ) , cx) ,
430427 ) ,
431428 }
432- w. write_str ( "</code></div>" ) ;
433- w. write_str ( ITEM_TABLE_ROW_CLOSE ) ;
429+ w. write_str ( "</code></dt>" ) ;
434430 }
435431
436432 clean:: ImportItem ( ref import) => {
437433 let stab_tags = import. source . did . map_or_else ( String :: new, |import_def_id| {
438434 extra_info_tags ( tcx, myitem, item, Some ( import_def_id) ) . to_string ( )
439435 } ) ;
440436
441- w. write_str ( ITEM_TABLE_ROW_OPEN ) ;
442437 let id = match import. kind {
443438 clean:: ImportKind :: Simple ( s) => {
444439 format ! ( " id=\" {}\" " , cx. derive_id( format!( "reexport.{s}" ) ) )
@@ -448,18 +443,17 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
448443 let ( stab_tags_before, stab_tags_after) = if stab_tags. is_empty ( ) {
449444 ( "" , "" )
450445 } else {
451- ( "<div class=\" desc docblock-short\" >" , "</div >" )
446+ ( "<dd class=\" desc docblock-short\" >" , "</dd >" )
452447 } ;
453448 write ! (
454449 w,
455- "<div class=\" item-name\" {id}>\
450+ "<dt class=\" item-name\" {id}>\
456451 <code>{vis}{imp}</code>\
457- </div >\
452+ </dt >\
458453 {stab_tags_before}{stab_tags}{stab_tags_after}",
459454 vis = visibility_print_with_space( myitem, cx) ,
460455 imp = import. print( cx) ,
461456 ) ;
462- w. write_str ( ITEM_TABLE_ROW_CLOSE ) ;
463457 }
464458
465459 _ => {
@@ -492,22 +486,21 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
492486 _ => "" ,
493487 } ;
494488
495- w. write_str ( ITEM_TABLE_ROW_OPEN ) ;
496489 let docs =
497490 MarkdownSummaryLine ( & myitem. doc_value ( ) , & myitem. links ( cx) ) . into_string ( ) ;
498491 let ( docs_before, docs_after) = if docs. is_empty ( ) {
499492 ( "" , "" )
500493 } else {
501- ( "<div class=\" desc docblock-short\" >" , "</div >" )
494+ ( "<dd class=\" desc docblock-short\" >" , "</dd >" )
502495 } ;
503496 write ! (
504497 w,
505- "<div class=\" item-name\" >\
498+ "<dt class=\" item-name\" >\
506499 <a class=\" {class}\" href=\" {href}\" title=\" {title}\" >{name}</a>\
507500 {visibility_and_hidden}\
508501 {unsafety_flag}\
509502 {stab_tags}\
510- </div >\
503+ </dt >\
511504 {docs_before}{docs}{docs_after}",
512505 name = EscapeBodyTextWithWbr ( myitem. name. unwrap( ) . as_str( ) ) ,
513506 visibility_and_hidden = visibility_and_hidden,
@@ -521,7 +514,6 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
521514 . collect:: <Vec <_>>( )
522515 . join( " " ) ,
523516 ) ;
524- w. write_str ( ITEM_TABLE_ROW_CLOSE ) ;
525517 }
526518 }
527519 }
0 commit comments