Skip to content

Commit

Permalink
fix: support for exclude_inherited option
Browse files Browse the repository at this point in the history
fixes: #242
  • Loading branch information
ankitskvmdam committed Sep 24, 2023
1 parent 0f585ab commit 785b638
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tmpl/container.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<?js } ?>

<?js
var classes = self.find({kind: 'class', memberof: doc.longname});
var classes = self.find({kind: 'class', memberof: doc.longname, inherited: {'!is': self.excludeInherited}});
if (!isGlobalPage && classes && classes.length) {
?>
<h2 id="classes" class="subsection-title has-anchor">Classes</h2>
Expand All @@ -103,7 +103,7 @@
<?js } ?>

<?js
var interfaces = self.find({kind: 'interface', memberof: doc.longname});
var interfaces = self.find({kind: 'interface', memberof: doc.longname, inherited: {'!is': self.excludeInherited}});
if (!isGlobalPage && interfaces && interfaces.length) {
?>
<h2 id="interfaces" class="subsection-title has-anchor">Interfaces</h2>
Expand All @@ -115,7 +115,7 @@
<?js } ?>

<?js
var mixins = self.find({kind: 'mixin', memberof: doc.longname});
var mixins = self.find({kind: 'mixin', memberof: doc.longname, inherited: {'!is': self.excludeInherited}});
if (!isGlobalPage && mixins && mixins.length) {
?>
<h2 id="mixins" class="subsection-title has-anchor">Mixins</h2>
Expand All @@ -127,7 +127,7 @@
<?js } ?>

<?js
var namespaces = self.find({kind: 'namespace', memberof: doc.longname});
var namespaces = self.find({kind: 'namespace', memberof: doc.longname, inherited: {'!is': self.excludeInherited}});
if (!isGlobalPage && namespaces && namespaces.length) {
?>
<h2 id="namespaces" class="subsection-title has-anchor">Namespaces</h2>
Expand All @@ -139,7 +139,7 @@
<?js } ?>

<?js
var members = self.find({kind: 'member', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
var members = self.find({kind: 'member', memberof: isGlobalPage ? {isUndefined: true} : doc.longname, inherited: {'!is': self.excludeInherited}});

// symbols that are assigned to module.exports are not globals, even though they're not a memberof anything
if (isGlobalPage && members && members.length && members.forEach) {
Expand All @@ -157,7 +157,7 @@
<?js } ?>

<?js
var methods = self.find({kind: 'function', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
var methods = self.find({kind: 'function', memberof: isGlobalPage ? {isUndefined: true} : doc.longname, inherited: {'!is': self.excludeInherited}});
if (methods && methods.length && methods.forEach) {
?>
<h2 id="methods" class="subsection-title has-anchor">Methods</h2>
Expand All @@ -168,7 +168,7 @@
<?js } ?>

<?js
var typedefs = self.find({kind: 'typedef', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
var typedefs = self.find({kind: 'typedef', memberof: isGlobalPage ? {isUndefined: true} : doc.longname, inherited: {'!is': self.excludeInherited}});
if (typedefs && typedefs.length && typedefs.forEach) {
?>
<h2 id="type-definitions" class="subsection-title has-anchor">Type Definitions</h2>
Expand All @@ -188,7 +188,7 @@
<?js } ?>

<?js
var events = self.find({kind: 'event', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
var events = self.find({kind: 'event', memberof: isGlobalPage ? {isUndefined: true} : doc.longname, inherited: {'!is': self.excludeInherited}});
if (events && events.length && events.forEach) {
?>
<h2 id="events" class="subsection-title has-anchor">Events</h2>
Expand Down

0 comments on commit 785b638

Please sign in to comment.