diff --git a/crates/markdown/src/lib.rs b/crates/markdown/src/lib.rs index d9752f941..b3a7e6849 100644 --- a/crates/markdown/src/lib.rs +++ b/crates/markdown/src/lib.rs @@ -43,7 +43,7 @@ impl WorldGenerator for Markdown { let world = &resolve.worlds[world]; uwriteln!( self.src, - "# World {}\n", + "# World {}\n", world.name.to_snake_case(), world.name ); @@ -121,7 +121,7 @@ impl WorldGenerator for Markdown { let name = resolve.name_world_key(name); uwriteln!( self.src, - "## Import interface {name}\n", + "## Import interface {name}\n", name.to_snake_case() ); self.hrefs @@ -160,7 +160,7 @@ impl WorldGenerator for Markdown { let name = resolve.name_world_key(name); uwriteln!( self.src, - "## Export interface {name}\n", + "## Export interface {name}\n", name.to_snake_case() ); self.hrefs @@ -265,7 +265,7 @@ impl InterfaceGenerator<'_> { fn func(&mut self, func: &Function) { self.push_str(&format!( - "#### `", + "#### `", func.name.to_snake_case() )); self.gen @@ -281,7 +281,7 @@ impl InterfaceGenerator<'_> { self.push_str("##### Params\n\n"); for (name, ty) in func.params.iter() { self.push_str(&format!( - "- `{}`: ", + "- `{}`: ", name, f = func.name.to_snake_case(), p = name.to_snake_case(), @@ -297,7 +297,7 @@ impl InterfaceGenerator<'_> { Results::Named(params) => { for (name, ty) in params.iter() { self.push_str(&format!( - "- `{}`: ", + "- `{}`: ", name, f = func.name.to_snake_case(), p = name, @@ -308,7 +308,7 @@ impl InterfaceGenerator<'_> { } Results::Anon(ty) => { self.push_str(&format!( - "- ", + "- ", f = func.name.to_snake_case(), )); self.print_ty(ty); @@ -453,7 +453,7 @@ impl InterfaceGenerator<'_> { self.types_header_printed = true; } self.push_str(&format!( - "#### `{} {}`\n", + "#### `{} {}`\n", name.to_snake_case(), type_, name, @@ -476,7 +476,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> { self.push_str("\n##### Record Fields\n\n"); for field in record.fields.iter() { self.push_str(&format!( - "- `{name}`: ", + "- `{name}`: ", r = name.to_snake_case(), f = field.name.to_snake_case(), name = field.name, @@ -509,7 +509,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> { self.push_str("\n##### Tuple Fields\n\n"); for (i, ty) in tuple.types.iter().enumerate() { self.push_str(&format!( - "- `{name}`: ", + "- `{name}`: ", r = name.to_snake_case(), f = i, name = i, @@ -530,7 +530,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> { self.push_str("\n##### Flags members\n\n"); for flag in flags.flags.iter() { self.push_str(&format!( - "- `{name}`: ", + "- `{name}`: ", r = name.to_snake_case(), f = flag.name.to_snake_case(), name = flag.name, @@ -556,7 +556,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> { self.push_str("\n##### Variant Cases\n\n"); for case in variant.cases.iter() { self.push_str(&format!( - "- `{name}`", + "- `{name}`", v = name.to_snake_case(), c = case.name.to_snake_case(), name = case.name, @@ -586,7 +586,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> { self.push_str("\n##### Enum Cases\n\n"); for case in enum_.cases.iter() { self.push_str(&format!( - "- `{name}`", + "- `{name}`", v = name.to_snake_case(), c = case.name.to_snake_case(), name = case.name,