build(aio): do not render "constructor()" heading in API docs (#22380)

Closes #22363

PR Close #22380
This commit is contained in:
Pete Bacon Darwin 2018-02-22 20:54:38 +00:00 committed by Alex Eagle
parent 3f3be429c9
commit 4bd3e5f92f
2 changed files with 8 additions and 6 deletions

View File

@ -15,7 +15,9 @@
{% include "includes/description.html" %}
{$ memberHelpers.renderProperties(doc.staticProperties, 'static-properties', 'static-property', 'Static Properties') $}
{$ memberHelpers.renderMethodDetails(doc.staticMethods, 'static-methods', 'static-method', 'Static Methods') $}
{% if doc.constructorDoc %}{$ memberHelpers.renderMethodDetail(doc.constructorDoc, 'constructor') $}{% endif %}
{% if doc.constructorDoc %}
<h2>Constructor</h2>
{$ memberHelpers.renderMethodDetail(doc.constructorDoc, 'constructor') $}{% endif %}
{$ memberHelpers.renderProperties(doc.properties, 'instance-properties', 'instance-property', 'Properties') $}

View File

@ -60,18 +60,18 @@
{%- macro renderMethodDetail(method, cssClass) -%}
<a id="{$ method.anchor $}"></a>
<table class="is-full-width method-table {$ cssClass $}">
<thead><tr><th><h3>
{% if method.name !== 'constructor' %}<thead><tr><th><h3>
{% if method.isCallMember %}<i>call signature</i>
{% elseif method.isNewMember %}<i>construct signature</i>
{% else %}{$ method.name $}()
{% endif %}
</h3></th></tr></thead>
</h3></th></tr></thead>{% endif %}
<tbody>
<tr>
{% if method.description %}<tr>
<td>
{% if method.description %}{$ method.description | marked $}{% endif %}
{$ method.description | marked $}
</td>
</tr>
</tr>{% endif %}
{% if method.overloads.length == 0 %}
<tr>
<td>