Support generating comments
tmattio opened this issue · comments
This would be absolutely amazing, the generated bindings could have documentation with odoc and using them in an editor would be much easier with the documentation on hover.
Support for complete Markdown to odoc conversions is certainly not a necessary effort, but some conversions might be worth supporting, for example:
`...`
->[ ... ]
```...```
->{[ ... ]}
Markdown:
```sh
rm -rf /
```
odoc:
{@sh [
rm -rf /
]}
See also: https://ocaml.github.io/odoc/odoc_for_authors.html
@smorimoto This is actually complicated. TypeScript Compiler API only handles JSDoc tags (such as @param
and @returns
) and leaves Markdown texts as plain texts, which means we would have to add a markdown parser to implement this.
I discussed about this with the odoc team, and we may support it somewhere in the OCaml Platform in the future, and there seems to be no reason for us to do this right away.