Is Zig's doc comments a superset of Markdown?

Can Zig’s doc comments be considered CommonMark with several extensions?

The Markdown parser doesn’t seem to implement all of the CommonMark syntax. Does this mean it’s not implemented yet or will it never be implemented? I’m writing doc comments following the CommonMark syntax, but I would like to know if this is OK. If there’s any syntax that will never be implemented I’d like to know about it to avoid using it.

For example, I sometimes use shortcut reference links to write links:

/// [RFC 8259].
///
/// [RFC 8259]: https://datatracker.ietf.org/doc/html/rfc8259

If this is never implemented, I would like to change it to use inline links instead.

We can also create references by writing something like `std.crypto.random`. Are there any other unique extensions like this?

Exact features of autodocs markdown can be found here zig/lib/docs/wasm/markdown.zig at 530335b572da5821bd438e2e68febd391502c668 · ziglang/zig · GitHub
cant say anything about how they will be in future

1 Like