motoko icon indicating copy to clipboard operation
motoko copied to clipboard

Doc comments for `module` don't work

Open vporton opened this issue 1 year ago • 2 comments

Doc comments for module don't work:

/// ...
module {
}

doesn't produce a doc for the module (at mops.one).

vporton avatar Mar 07 '24 19:03 vporton

Example: https://mops.one/nacdb/docs/NacDB

vporton avatar Mar 07 '24 19:03 vporton

My understanding is that this is related to a convention in the mo-doc command for specifying file-level doc comments.

You should be able to fix this by moving the doc comments above the import section. We could also consider adding support for doc comments directly before the module, since that seems reasonably intuitive.

rvanasa avatar Mar 07 '24 20:03 rvanasa