@@ -352,32 +352,36 @@ pub fn fmt_base_classes<'e, T: ASTEntry<'e>>(entry: &T, kw: &str, builder: &Buil
352352
353353 HtmlElement :: new ( "div" )
354354 . with_classes ( & [ "entity" , "class" ] )
355- . with_child ( Html :: span ( & [ "keyword" , "space-after" ] , kw) )
356- . with_child ( Html :: span ( & [ "name" ] , entry. name ( ) . as_str ( ) ) )
357- . with_child_opt ( ( !bases. is_empty ( ) ) . then_some (
358- Html :: span ( & [ "space-before" , "space-after" ] , ":" )
359- ) )
360- . with_children ( bases. into_iter ( )
361- . map ( |base| HtmlList :: new ( [
362- base. get_accessibility ( ) . map ( |a|
363- Html :: span (
364- & [ "keyword" , "space-after" ] ,
365- match a {
366- Accessibility :: Public => "public" ,
367- Accessibility :: Private => "private" ,
368- Accessibility :: Protected => "protected" ,
369- }
370- )
371- ) ,
372- base. is_virtual_base ( ) . then_some (
373- Html :: span ( & [ "keyword" , "space-after" ] , "virtual" )
374- ) ,
375- base. get_type ( ) . map ( |ty| fmt_type ( & ty, builder) )
376- ] . into_iter ( ) . flatten ( ) . collect ( ) ) . into ( ) )
377- . intersperse_with ( || Html :: span ( & [ "space-after" ] , "," ) . into ( ) )
378- . collect ( )
355+ . with_child_opt ( fmt_template_args ( entry. entity ( ) , builder) )
356+ . with_child ( HtmlElement :: new ( "span" )
357+ . with_class ( "class-decl" )
358+ . with_child ( Html :: span ( & [ "keyword" , "space-after" ] , kw) )
359+ . with_child ( Html :: span ( & [ "name" ] , entry. entity ( ) . get_name ( ) . unwrap_or ( "_" . into ( ) ) . as_str ( ) ) )
360+ . with_child_opt ( ( !bases. is_empty ( ) ) . then_some (
361+ Html :: span ( & [ "space-before" , "space-after" ] , ":" )
362+ ) )
363+ . with_children ( bases. into_iter ( )
364+ . map ( |base| HtmlList :: new ( [
365+ base. get_accessibility ( ) . map ( |a|
366+ Html :: span (
367+ & [ "keyword" , "space-after" ] ,
368+ match a {
369+ Accessibility :: Public => "public" ,
370+ Accessibility :: Private => "private" ,
371+ Accessibility :: Protected => "protected" ,
372+ }
373+ )
374+ ) ,
375+ base. is_virtual_base ( ) . then_some (
376+ Html :: span ( & [ "keyword" , "space-after" ] , "virtual" )
377+ ) ,
378+ base. get_type ( ) . map ( |ty| fmt_type ( & ty, builder) )
379+ ] . into_iter ( ) . flatten ( ) . collect ( ) ) . into ( ) )
380+ . intersperse_with ( || Html :: span ( & [ "space-after" ] , "," ) . into ( ) )
381+ . collect ( )
382+ )
383+ . with_child ( Html :: span ( & [ "space-before" ] , "{ ... }" ) )
379384 )
380- . with_child ( Html :: span ( & [ "space-before" ] , "{ ... }" ) )
381385 . into ( )
382386}
383387
0 commit comments