mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 15:23:05 +02:00
Fix white space in generated API docs
This commit is contained in:
parent
dff37a71eb
commit
78b7c04457
9 changed files with 49 additions and 28 deletions
|
@ -143,6 +143,14 @@ td {
|
||||||
border: solid #c7cccb 1px;
|
border: solid #c7cccb 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td > p:first-child, td > ul:first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
td > p:last-child, td > ul:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
article table thead tr th, article table tbody tr td, article table tbody tr td p {
|
article table thead tr th, article table tbody tr td, article table tbody tr td p {
|
||||||
font-size: .89rem;
|
font-size: .89rem;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
|
@ -596,11 +604,6 @@ header {
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.params td.description > p:first-child, .props td.description > p:first-child {
|
|
||||||
margin-top: 0;
|
|
||||||
padding-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.param-type, .params td .param-type, .param-type dd {
|
span.param-type, .params td .param-type, .param-type dd {
|
||||||
color: #606;
|
color: #606;
|
||||||
font-family: Consolas, Monaco, 'Andale Mono', monospace
|
font-family: Consolas, Monaco, 'Andale Mono', monospace
|
||||||
|
|
15
tools/jsdoc/hifi-jsdoc-template/tmpl/description.tmpl
Normal file
15
tools/jsdoc/hifi-jsdoc-template/tmpl/description.tmpl
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?js
|
||||||
|
var description = obj;
|
||||||
|
var self = this;
|
||||||
|
var descriptionRegExp = new RegExp('<(p|ul|div|table)[^>]*>', 'i');
|
||||||
|
var descriptionIndex = description.search(descriptionRegExp);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?js if (descriptionIndex === -1) { ?>
|
||||||
|
<p><?js= description ?></p>
|
||||||
|
<?js } else if (descriptionIndex !== 0) { ?>
|
||||||
|
<p><?js= description.slice(0, descriptionIndex) ?></p>
|
||||||
|
<?js= description.slice(descriptionIndex) ?>
|
||||||
|
<?js } else { ?>
|
||||||
|
<?js= description ?>
|
||||||
|
<?js } ?>
|
|
@ -16,7 +16,7 @@ var self = this;
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?js if (data.description) { ?>
|
<?js if (data.description) { ?>
|
||||||
<div><?js= data.description ?></div>
|
<?js= self.partial('description.tmpl', data.description) ?>
|
||||||
<?js } else { ?>
|
<?js } else { ?>
|
||||||
<p style="color:red;"> </p>
|
<p style="color:red;"> </p>
|
||||||
<?js } ?>
|
<?js } ?>
|
||||||
|
|
|
@ -25,10 +25,10 @@ var self = this;
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?js if (data.kind !== 'module' && !data.hideconstructor) { ?>
|
<?js if (data.kind !== 'module' && !data.hideconstructor) { ?>
|
||||||
<div>
|
<?js if (data.description) { ?>
|
||||||
<?js= data.description ?>
|
<?js= self.partial('description.tmpl', data.description) ?>
|
||||||
<?js= this.partial('details.tmpl', data) ?>
|
<?js } ?>
|
||||||
</div>
|
<?js= this.partial('details.tmpl', data) ?>
|
||||||
<?js } else { ?>
|
<?js } else { ?>
|
||||||
<p style="color:red;"> </p>
|
<p style="color:red;"> </p>
|
||||||
<?js } ?>
|
<?js } ?>
|
||||||
|
|
|
@ -29,11 +29,9 @@ var self = this;
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?js if (data.description) { ?>
|
<?js if (data.description) { ?>
|
||||||
<?js= description ?>
|
<?js= this.partial('description.tmpl', data.description) ?>
|
||||||
<?js= this.partial('details.tmpl', data) ?>
|
|
||||||
<?js } else { ?>
|
|
||||||
<?js= this.partial('details.tmpl', data) ?>
|
|
||||||
<?js } ?>
|
<?js } ?>
|
||||||
|
<?js= this.partial('details.tmpl', data) ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?js } ?>
|
<?js } ?>
|
||||||
|
|
|
@ -120,10 +120,15 @@
|
||||||
</td>
|
</td>
|
||||||
<?js } ?>
|
<?js } ?>
|
||||||
|
|
||||||
<td class="description last"><?js= param.description ?><?js if (param.subparams) { ?>
|
<td class="description last">
|
||||||
<h6>Properties</h6>
|
<?js if (param.description) { ?>
|
||||||
<?js= self.partial('params.tmpl', param.subparams) ?>
|
<?js= self.partial('description.tmpl', param.description) ?>
|
||||||
<?js } ?></td>
|
<?js } ?>
|
||||||
|
<?js if (param.subparams) { ?>
|
||||||
|
<h6>Properties</h6>
|
||||||
|
<?js= self.partial('params.tmpl', param.subparams) ?>
|
||||||
|
<?js } ?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?js }); ?>
|
<?js }); ?>
|
||||||
|
|
|
@ -87,7 +87,9 @@
|
||||||
<?js } ?>
|
<?js } ?>
|
||||||
|
|
||||||
<td class="description last">
|
<td class="description last">
|
||||||
<?js= prop.description ?>
|
<?js if (prop.description) { ?>
|
||||||
|
<?js= self.partial('description.tmpl', prop.description) ?>
|
||||||
|
<?js } ?>
|
||||||
<?js if (props.hasDefault) {?>
|
<?js if (props.hasDefault) {?>
|
||||||
<?js if (typeof prop.defaultvalue !== 'undefined') { ?>
|
<?js if (typeof prop.defaultvalue !== 'undefined') { ?>
|
||||||
<p><b>Default Value:</b> <?js= self.htmlsafe(prop.defaultvalue) ?> </p>
|
<p><b>Default Value:</b> <?js= self.htmlsafe(prop.defaultvalue) ?> </p>
|
||||||
|
|
|
@ -25,10 +25,10 @@ var self = this;
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?js if (data.kind !== 'module' && !data.hideconstructor) { ?>
|
<?js if (data.kind !== 'module' && !data.hideconstructor) { ?>
|
||||||
<div>
|
<?js if (data.description) { ?>
|
||||||
<?js= data.description ?>
|
<?js= self.partial('description.tmpl', data.description) ?>
|
||||||
<?js= this.partial('details.tmpl', data) ?>
|
<?js } ?>
|
||||||
</div>
|
<?js= this.partial('details.tmpl', data) ?>
|
||||||
<?js } else { ?>
|
<?js } else { ?>
|
||||||
<p style="color:red;"> </p>
|
<p style="color:red;"> </p>
|
||||||
<?js } ?>
|
<?js } ?>
|
||||||
|
|
|
@ -13,12 +13,10 @@ var self = this;
|
||||||
<code><?js= (kind === 'class' ? 'new ' : '') + name + (data.signatureHead || '') ?></code></a>
|
<code><?js= (kind === 'class' ? 'new ' : '') + name + (data.signatureHead || '') ?></code></a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?js if (data.description) { ?>
|
<?js if (data.description) { ?>
|
||||||
<?js= description ?>
|
<?js= this.partial('description.tmpl', description) ?>
|
||||||
<?js= this.partial('details.tmpl', data) ?>
|
<?js } ?>
|
||||||
<?js } else { ?>
|
|
||||||
<?js= this.partial('details.tmpl', data) ?>
|
<?js= this.partial('details.tmpl', data) ?>
|
||||||
<?js } ?>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?js } ?>
|
<?js } ?>
|
||||||
|
|
Loading…
Reference in a new issue