@@ -43,7 +43,7 @@ impl WorldGenerator for Markdown {
43
43
let world = & resolve. worlds [ world] ;
44
44
uwriteln ! (
45
45
self . src,
46
- "# <a name =\" {}\" ></a>World {}\n " ,
46
+ "# <a id =\" {}\" ></a>World {}\n " ,
47
47
world. name. to_snake_case( ) ,
48
48
world. name
49
49
) ;
@@ -121,7 +121,7 @@ impl WorldGenerator for Markdown {
121
121
let name = resolve. name_world_key ( name) ;
122
122
uwriteln ! (
123
123
self . src,
124
- "## <a name =\" {}\" ></a>Import interface {name}\n " ,
124
+ "## <a id =\" {}\" ></a>Import interface {name}\n " ,
125
125
name. to_snake_case( )
126
126
) ;
127
127
self . hrefs
@@ -160,7 +160,7 @@ impl WorldGenerator for Markdown {
160
160
let name = resolve. name_world_key ( name) ;
161
161
uwriteln ! (
162
162
self . src,
163
- "## <a name =\" {}\" ></a>Export interface {name}\n " ,
163
+ "## <a id =\" {}\" ></a>Export interface {name}\n " ,
164
164
name. to_snake_case( )
165
165
) ;
166
166
self . hrefs
@@ -265,7 +265,7 @@ impl InterfaceGenerator<'_> {
265
265
266
266
fn func ( & mut self , func : & Function ) {
267
267
self . push_str ( & format ! (
268
- "#### <a name =\" {0}\" ></a>`" ,
268
+ "#### <a id =\" {0}\" ></a>`" ,
269
269
func. name. to_snake_case( )
270
270
) ) ;
271
271
self . gen
@@ -281,7 +281,7 @@ impl InterfaceGenerator<'_> {
281
281
self . push_str ( "##### Params\n \n " ) ;
282
282
for ( name, ty) in func. params . iter ( ) {
283
283
self . push_str ( & format ! (
284
- "- <a name =\" {f}.{p}\" ></a>`{}`: " ,
284
+ "- <a id =\" {f}.{p}\" ></a>`{}`: " ,
285
285
name,
286
286
f = func. name. to_snake_case( ) ,
287
287
p = name. to_snake_case( ) ,
@@ -297,7 +297,7 @@ impl InterfaceGenerator<'_> {
297
297
Results :: Named ( params) => {
298
298
for ( name, ty) in params. iter ( ) {
299
299
self . push_str ( & format ! (
300
- "- <a name =\" {f}.{p}\" ></a>`{}`: " ,
300
+ "- <a id =\" {f}.{p}\" ></a>`{}`: " ,
301
301
name,
302
302
f = func. name. to_snake_case( ) ,
303
303
p = name,
@@ -308,7 +308,7 @@ impl InterfaceGenerator<'_> {
308
308
}
309
309
Results :: Anon ( ty) => {
310
310
self . push_str ( & format ! (
311
- "- <a name =\" {f}.0\" ></a> " ,
311
+ "- <a id =\" {f}.0\" ></a> " ,
312
312
f = func. name. to_snake_case( ) ,
313
313
) ) ;
314
314
self . print_ty ( ty) ;
@@ -469,7 +469,7 @@ impl InterfaceGenerator<'_> {
469
469
self . types_header_printed = true ;
470
470
}
471
471
self . push_str ( & format ! (
472
- "#### <a name =\" {}\" ></a>`{} {}`\n " ,
472
+ "#### <a id =\" {}\" ></a>`{} {}`\n " ,
473
473
name. to_snake_case( ) ,
474
474
type_,
475
475
name,
@@ -492,7 +492,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> {
492
492
self . push_str ( "\n ##### Record Fields\n \n " ) ;
493
493
for field in record. fields . iter ( ) {
494
494
self . push_str ( & format ! (
495
- "- <a name =\" {r}.{f}\" ></a>`{name}`: " ,
495
+ "- <a id =\" {r}.{f}\" ></a>`{name}`: " ,
496
496
r = name. to_snake_case( ) ,
497
497
f = field. name. to_snake_case( ) ,
498
498
name = field. name,
@@ -525,7 +525,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> {
525
525
self . push_str ( "\n ##### Tuple Fields\n \n " ) ;
526
526
for ( i, ty) in tuple. types . iter ( ) . enumerate ( ) {
527
527
self . push_str ( & format ! (
528
- "- <a name =\" {r}.{f}\" ></a>`{name}`: " ,
528
+ "- <a id =\" {r}.{f}\" ></a>`{name}`: " ,
529
529
r = name. to_snake_case( ) ,
530
530
f = i,
531
531
name = i,
@@ -546,7 +546,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> {
546
546
self . push_str ( "\n ##### Flags members\n \n " ) ;
547
547
for flag in flags. flags . iter ( ) {
548
548
self . push_str ( & format ! (
549
- "- <a name =\" {r}.{f}\" ></a>`{name}`: " ,
549
+ "- <a id =\" {r}.{f}\" ></a>`{name}`: " ,
550
550
r = name. to_snake_case( ) ,
551
551
f = flag. name. to_snake_case( ) ,
552
552
name = flag. name,
@@ -572,7 +572,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> {
572
572
self . push_str ( "\n ##### Variant Cases\n \n " ) ;
573
573
for case in variant. cases . iter ( ) {
574
574
self . push_str ( & format ! (
575
- "- <a name =\" {v}.{c}\" ></a>`{name}`" ,
575
+ "- <a id =\" {v}.{c}\" ></a>`{name}`" ,
576
576
v = name. to_snake_case( ) ,
577
577
c = case. name. to_snake_case( ) ,
578
578
name = case. name,
@@ -602,7 +602,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> {
602
602
self . push_str ( "\n ##### Enum Cases\n \n " ) ;
603
603
for case in enum_. cases . iter ( ) {
604
604
self . push_str ( & format ! (
605
- "- <a name =\" {v}.{c}\" ></a>`{name}`" ,
605
+ "- <a id =\" {v}.{c}\" ></a>`{name}`" ,
606
606
v = name. to_snake_case( ) ,
607
607
c = case. name. to_snake_case( ) ,
608
608
name = case. name,
0 commit comments