-
Notifications
You must be signed in to change notification settings - Fork 99
Add hidden attribute #950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
3Rafal
wants to merge
8
commits into
ocaml:master
Choose a base branch
from
3Rafal:hidden-attr
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add hidden attribute #950
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
79b8266
WIP: Add hidden attribute
3Rafal 3b2ca83
Parse hidden attribute
3Rafal d2aed8f
Add some basic tests
3Rafal dedf22e
Fix build for OCAML_VERSION < 4.10
3Rafal 5d59a96
Fill missing cases
3Rafal f57d846
Add dead link test for hidden attribute
3Rafal a234da0
Fix build
3Rafal f7fe7d4
Add constraint to hidden_dead_link_doc test
3Rafal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
(** This test cases exercise hidden attribute. *) | ||
|
||
val foo : int | ||
(** This is normal commented text. *) | ||
|
||
val bar : int [@@hidden] | ||
|
||
module M : | ||
sig | ||
val baz : int | ||
|
||
end [@@hidden] | ||
|
||
module N : | ||
sig | ||
val quux : int | ||
|
||
[@@@hidden] | ||
|
||
val omg : int | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
(* This tests that references to hidden items (items in no documentation mode) don't get rendered *) | ||
|
||
module Foo : sig | ||
type t | ||
end | ||
|
||
type foo = | Bar of Foo.t | ||
|
||
type bar = | Bar of { field : Foo.t } | ||
|
||
type foo_ = Bar_ of (int * Foo.t) * int | ||
type bar_ = Bar__ of Foo.t option | ||
|
||
module Another_Foo : sig | ||
type t | ||
end [@@hidden] | ||
|
||
(* this should be rendered as `type another_foo` because it contains a reference to a hidden module*) | ||
type another_foo = | Bar of Another_Foo.t | ||
|
||
(* this should be rendered as `type another_bar` because it contains a reference to a hidden module*) | ||
type another_bar = | Bar of { field : Another_Foo.t } | ||
|
||
type another_foo_ = Bar_ of (int * Another_Foo.t) * int | ||
type another_bar_ = Bar__ of Another_Foo.t option |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head><title>N (Hidden.N)</title><link rel="stylesheet" href="odoc.css"/> | ||
<meta charset="utf-8"/><meta name="generator" content="odoc %%VERSION%%"/> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"/> | ||
<script src="highlight.pack.js"></script> | ||
<script>hljs.initHighlightingOnLoad();</script> | ||
</head> | ||
<body class="odoc"> | ||
<nav class="odoc-nav"><a href="Hidden.html">Up</a> – | ||
<a href="Hidden.html">Hidden</a> » N | ||
</nav> | ||
<header class="odoc-preamble"> | ||
<h1>Module <code><span>Hidden.N</span></code></h1> | ||
</header> | ||
<div class="odoc-content"> | ||
<div class="odoc-spec"> | ||
<div class="spec value anchored" id="val-quux"> | ||
<a href="#val-quux" class="anchor"></a> | ||
<code><span><span class="keyword">val</span> quux : int</span></code> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head><title>Hidden (Hidden)</title><link rel="stylesheet" href="odoc.css"/> | ||
<meta charset="utf-8"/><meta name="generator" content="odoc %%VERSION%%"/> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"/> | ||
<script src="highlight.pack.js"></script> | ||
<script>hljs.initHighlightingOnLoad();</script> | ||
</head> | ||
<body class="odoc"> | ||
<header class="odoc-preamble"> | ||
<h1>Module <code><span>Hidden</span></code></h1> | ||
<p>This test cases exercise hidden attribute.</p> | ||
</header> | ||
<div class="odoc-content"> | ||
<div class="odoc-spec"> | ||
<div class="spec value anchored" id="val-foo"> | ||
<a href="#val-foo" class="anchor"></a> | ||
<code><span><span class="keyword">val</span> foo : int</span></code> | ||
</div><div class="spec-doc"><p>This is normal commented text.</p></div> | ||
</div> | ||
<div class="odoc-spec"> | ||
<div class="spec module anchored" id="module-N"> | ||
<a href="#module-N" class="anchor"></a> | ||
<code> | ||
<span><span class="keyword">module</span> <a href="Hidden-N.html">N</a> | ||
</span> | ||
<span> : <span class="keyword">sig</span> ... | ||
<span class="keyword">end</span> | ||
</span> | ||
</code> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head><title>Foo (Hidden_dead_link_doc.Foo)</title> | ||
<link rel="stylesheet" href="odoc.css"/><meta charset="utf-8"/> | ||
<meta name="generator" content="odoc %%VERSION%%"/> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"/> | ||
<script src="highlight.pack.js"></script> | ||
<script>hljs.initHighlightingOnLoad();</script> | ||
</head> | ||
<body class="odoc"> | ||
<nav class="odoc-nav"><a href="Hidden_dead_link_doc.html">Up</a> – | ||
<a href="Hidden_dead_link_doc.html">Hidden_dead_link_doc</a> » | ||
Foo | ||
</nav> | ||
<header class="odoc-preamble"> | ||
<h1>Module <code><span>Hidden_dead_link_doc.Foo</span></code></h1> | ||
</header> | ||
<div class="odoc-content"> | ||
<div class="odoc-spec"> | ||
<div class="spec type anchored" id="type-t"> | ||
<a href="#type-t" class="anchor"></a> | ||
<code><span><span class="keyword">type</span> t</span></code> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ?