You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you do code extraction you sometimes have setup code (e.g. a license header) that you'd like to hide in the rendering. With mli files you can simply use a stop comment but in .mld files there is no such thing, everything gets rendered, as noticed in #998.
I think we should standardize an info string tag, e.g. @hidden which should work regardless of whether we are processing .mld file or a cmti one and that removes the tagged code block from the rendering.
So for example I can have:
{@ocaml @hidden name=header[
(*---------------------------------------------------------------------------
Copyright (c) 2011 The cmdliner programmers. All rights reserved.
SPDX-License-Identifier: CC0-1.0
---------------------------------------------------------------------------*)
]}
Yes, this is a good idea. I'm not sure whether we should go with @hidden or just hidden - I can see why using the same string as the tag is nice, It'll look a bit odd if other atoms/bindings don't also start with an '@', and that seems unnecessary.
I'm not sure whether we should go with @hidden or just hidden
Neither I am :–) Initially I was more leaning towards @-less. But arguments in favour are that it gives a strong hint that this will be interpreted by odoc rendering and that such a tag could be introduced in the ocamldoc language in the future.
With new features comes new wishes :–)
When you do code extraction you sometimes have setup code (e.g. a license header) that you'd like to hide in the rendering. With
mli
files you can simply use a stop comment but in.mld
files there is no such thing, everything gets rendered, as noticed in #998.I think we should standardize an info string tag, e.g.
@hidden
which should work regardless of whether we are processing.mld
file or acmti
one and that removes the tagged code block from the rendering.So for example I can have:
And then:
And extract the examples as
The text was updated successfully, but these errors were encountered: