Skip to content

Commit

Permalink
fix(docs): Add anchor links to generated reference docs
Browse files Browse the repository at this point in the history
Fixes #60
  • Loading branch information
trodrigues committed Apr 5, 2016
1 parent eb3904b commit 4a9576f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion jsdoc-template/tmpl/members.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
var data = obj;
var self = this;
?>
<h4 class="name" id="<?js= id ?>"><?js= data.attribs + name + (data.signature ? data.signature : '') ?></h4>
<h4 class="name" id="<?js= id ?>">
<?js= data.attribs + name + (data.signature ? data.signature : '') ?>
<a href="#<?js= id ?>">#</a>
</h4>

<?js if (data.summary) { ?>
<p class="summary"><?js= summary ?></p>
Expand Down
6 changes: 4 additions & 2 deletions jsdoc-template/tmpl/method.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ var self = this;
<h2>Constructor</h2>
<?js } ?>

<h4 class="name" id="<?js= id ?>"><?js= data.attribs + (kind === 'class' ? 'new ' : '') +
name + (data.signature || '') ?></h4>
<h4 class="name" id="<?js= id ?>">
<?js= data.attribs + (kind === 'class' ? 'new ' : '') + name + (data.signature || '') ?>
<a href="#<?js= id ?>">#</a>
</h4>

<?js if (data.summary) { ?>
<p class="summary"><?js= summary ?></p>
Expand Down

0 comments on commit 4a9576f

Please sign in to comment.