Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
cpetig committed Jul 29, 2024
2 parents 860b1d3 + 50ef795 commit d1f7e15
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions crates/markdown/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl WorldGenerator for Markdown {
let world = &resolve.worlds[world];
uwriteln!(
self.src,
"# <a name=\"{}\"></a>World {}\n",
"# <a id=\"{}\"></a>World {}\n",
world.name.to_snake_case(),
world.name
);
Expand Down Expand Up @@ -121,7 +121,7 @@ impl WorldGenerator for Markdown {
let name = resolve.name_world_key(name);
uwriteln!(
self.src,
"## <a name=\"{}\"></a>Import interface {name}\n",
"## <a id=\"{}\"></a>Import interface {name}\n",
name.to_snake_case()
);
self.hrefs
Expand Down Expand Up @@ -160,7 +160,7 @@ impl WorldGenerator for Markdown {
let name = resolve.name_world_key(name);
uwriteln!(
self.src,
"## <a name=\"{}\"></a>Export interface {name}\n",
"## <a id=\"{}\"></a>Export interface {name}\n",
name.to_snake_case()
);
self.hrefs
Expand Down Expand Up @@ -265,7 +265,7 @@ impl InterfaceGenerator<'_> {

fn func(&mut self, func: &Function) {
self.push_str(&format!(
"#### <a name=\"{0}\"></a>`",
"#### <a id=\"{0}\"></a>`",
func.name.to_snake_case()
));
self.gen
Expand All @@ -281,7 +281,7 @@ impl InterfaceGenerator<'_> {
self.push_str("##### Params\n\n");
for (name, ty) in func.params.iter() {
self.push_str(&format!(
"- <a name=\"{f}.{p}\"></a>`{}`: ",
"- <a id=\"{f}.{p}\"></a>`{}`: ",
name,
f = func.name.to_snake_case(),
p = name.to_snake_case(),
Expand All @@ -297,7 +297,7 @@ impl InterfaceGenerator<'_> {
Results::Named(params) => {
for (name, ty) in params.iter() {
self.push_str(&format!(
"- <a name=\"{f}.{p}\"></a>`{}`: ",
"- <a id=\"{f}.{p}\"></a>`{}`: ",
name,
f = func.name.to_snake_case(),
p = name,
Expand All @@ -308,7 +308,7 @@ impl InterfaceGenerator<'_> {
}
Results::Anon(ty) => {
self.push_str(&format!(
"- <a name=\"{f}.0\"></a> ",
"- <a id=\"{f}.0\"></a> ",
f = func.name.to_snake_case(),
));
self.print_ty(ty);
Expand Down Expand Up @@ -453,7 +453,7 @@ impl InterfaceGenerator<'_> {
self.types_header_printed = true;
}
self.push_str(&format!(
"#### <a name=\"{}\"></a>`{} {}`\n",
"#### <a id=\"{}\"></a>`{} {}`\n",
name.to_snake_case(),
type_,
name,
Expand All @@ -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!(
"- <a name=\"{r}.{f}\"></a>`{name}`: ",
"- <a id=\"{r}.{f}\"></a>`{name}`: ",
r = name.to_snake_case(),
f = field.name.to_snake_case(),
name = field.name,
Expand Down Expand Up @@ -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!(
"- <a name=\"{r}.{f}\"></a>`{name}`: ",
"- <a id=\"{r}.{f}\"></a>`{name}`: ",
r = name.to_snake_case(),
f = i,
name = i,
Expand All @@ -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!(
"- <a name=\"{r}.{f}\"></a>`{name}`: ",
"- <a id=\"{r}.{f}\"></a>`{name}`: ",
r = name.to_snake_case(),
f = flag.name.to_snake_case(),
name = flag.name,
Expand All @@ -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!(
"- <a name=\"{v}.{c}\"></a>`{name}`",
"- <a id=\"{v}.{c}\"></a>`{name}`",
v = name.to_snake_case(),
c = case.name.to_snake_case(),
name = case.name,
Expand Down Expand Up @@ -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!(
"- <a name=\"{v}.{c}\"></a>`{name}`",
"- <a id=\"{v}.{c}\"></a>`{name}`",
v = name.to_snake_case(),
c = case.name.to_snake_case(),
name = case.name,
Expand Down

0 comments on commit d1f7e15

Please sign in to comment.