build(docs-infra): render `@see` information in members (#28069)

Previously `@see` tags were only rendered for top level class-like
docs. Now these tags are rendered for methods and properties too.

PR Close #28069
This commit is contained in:
Pete Bacon Darwin 2019-01-11 11:16:27 +00:00 committed by Andrew Kushnir
parent fe4d3a1619
commit cd51775390
2 changed files with 31 additions and 4 deletions

View File

@ -78,6 +78,14 @@ p, ol, ul, ol, li, input, a {
}
}
p {
margin: 14px 0 0;
}
p + ul {
margin-top: 4px;
}
ol {
li, p {
margin: 4px 0;
@ -123,8 +131,13 @@ td {
padding: 8px 30px;
letter-spacing: 0.30px;
p:first-child, p:last-child {
margin: 0;
> p, ul {
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
}
}

View File

@ -95,6 +95,13 @@
{% if method.shortDescription %}<tr>
<td class="short-description">
{$ method.shortDescription | marked $}
{%- if method.see.length %}
<p>See also:</p>
<ul>
{% for see in method.see %}
<li>{$ see | marked $}</li>{% endfor %}
</ul>
{% endif %}
</td>
</tr>{% endif %}
{% if method.overloads.length == 0 %}
@ -203,10 +210,17 @@
<td>
{%- if (property.isGetAccessor or property.isReadonly) and not property.isSetAccessor %}<span class='read-only-property'>Read-only.</span>{% endif %}
{%- if property.isSetAccessor and not property.isGetAccessor %}<span class='write-only-property'>Write-only.</span>{% endif %}
{% if property.constructorParamDoc %} <span class='from-constructor'>Declared in constructor.</span>{% endif %}
{% if property.shortDescription %}{$ property.shortDescription | marked $}{% endif %}
{$ (property.description or property.constructorParamDoc.description) | marked $}
{% if property.constructorParamDoc %} <span class='from-constructor'>Declared in constructor.</span>{% endif %}
</td>
{%- if property.see.length %}
<p>See also:</p>
<ul>
{% for see in property.see %}
<li>{$ see | marked $}</li>{% endfor %}
</ul>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>