bytecodealliance / wit-bindgen

A language binding generator for WebAssembly interface types
Apache License 2.0
1.02k stars 194 forks source link

`wit-abi` gets confused about imports #667

Open abrown opened 1 year ago

abrown commented 1 year ago

Moved from https://github.com/WebAssembly/wasi-tools/issues/17; the "tool" mentioned here is wit-abi:

Looking at the Markdown/HTML produced for wasi-nn, this tool seems to confuse the Markdown parser whether it should convert several lines to Markdown or print them as HTML: ml.md. wit-abi happily produces intermixed Markdown and HTML until it gets to a point (I believe related to imports?) where it dumps something that gets displayed as:

#### `type tensor` [`tensor`](#tensor)

#### `type tensor-data` [`tensor-data`](#tensor_data)

#### `type graph` [`graph`](#graph)

#### `type graph-execution-context` `u32`

This is not a high priority issue but I thought I would report it while it's on my mind.

alexcrichton commented 1 year ago

For wit-bindgen the invocation I believe will be wit-bindgen markdown ./wit -w ml which produces this output