odoc icon indicating copy to clipboard operation
odoc copied to clipboard

Add hidden attribute

Open 3Rafal opened this issue 1 year ago • 4 comments

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.

3Rafal avatar Apr 03 '23 10:04 3Rafal

Thanks a lot for contributing to Odoc :)

Julow avatar Apr 07 '23 09:04 Julow

@Julow , if we want to use (**@hidden*) tag, then the change will involve odoc-parser. I can do a PR to parser which handles it. Do you think I can proceed, or should we wait for @jonludlam ?

3Rafal avatar Apr 14 '23 11:04 3Rafal

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 handle_internal_tags signals what attributes are expected but @hidden is always expected so you don't need to hook into that and instead change the return value of the parsing functions.

Julow avatar Apr 14 '23 12:04 Julow

I have created a PR for a new tag: https://github.com/ocaml-doc/odoc-parser/pull/16

3Rafal avatar Apr 14 '23 13:04 3Rafal