Repository navigation
Conversation
Julow
left a comment
There was a problem hiding this comment.
The implementation looks good and the tests seem sufficient.
The [@@@hidden] seems unnecessary as we already have (**/**), which can always be used instead.
If we keep this feature, I suggest making "on" and "off" markers more explicit as there's room on the syntax:
[@@@hidden]
type a (* this is hidden *)
[@@@hidden]
type b (* this is visible *)
[@@@hidden on]
type a
[@@@hidden off]
type bAs @lpw25 said in #578 (comment), why use an attribute ([@@hidden]) instead of a tag ((** @hidden *)) ?
Odoc has other similar tags (the current bad name is "internal") like @canonical, @inline, etc...
Pinging @jonludlam as you decided on the syntax.
|
Thanks a lot for contributing to Odoc :) |
|
@Julow , if we want to use |
|
I don't know why we want the attribute but we also want the tag! There's work to do on odoc-parser indeed. On Odoc's side, this kind of attributes are handled specifically here: https://github.com/ocaml/odoc/blob/master/src/model/semantics.mli#L14 the type |
|
I have created a PR for a new tag: ocaml-doc/odoc-parser#16 |
| match load_payload attr_payload with | ||
| | Some p -> Some (`Doc p) | ||
| | None -> None) | ||
| | "hidden" | "ocaml.hidden" -> Some (`Hidden attr_loc) |
There was a problem hiding this comment.
We discussed with @jonludlam and found that we don't need the attribute but prefer the tag instead. Do you mind opening a PR for that ?
Implemented as specified in #578
I should probably add some documentation (and maybe more tests), but it would be better if someone could confirm that this implementation is correct beforehand.