mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-25 14:26:29 +00:00
Fix example indentation
This commit is contained in:
parent
c0128f1055
commit
ced80fbb16
@ -37,7 +37,7 @@
|
||||
<div class='sm-col sm-col-9 md-col-10 flex flex-column'>
|
||||
<div class='flex-auto full-width'>
|
||||
{{#each docs}}
|
||||
{{> section}}
|
||||
{{> section}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -53,15 +53,13 @@
|
||||
|
||||
{{#if examples}}
|
||||
<h4>Examples</h4>
|
||||
{{#each examples}}
|
||||
<pre>{{{.}}}</pre>
|
||||
{{/each}}
|
||||
{{#each examples}}<pre>{{{.}}}</pre>{{/each}}
|
||||
{{/if}}
|
||||
|
||||
{{#if members.instance}}
|
||||
{{#each members.instance}}
|
||||
<div class='section-indent'>
|
||||
{{> section}}
|
||||
{{> section}}
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
@ -69,7 +67,7 @@
|
||||
{{#if members.static}}
|
||||
{{#each members.static}}
|
||||
<div class='section-indent'>
|
||||
{{> section}}
|
||||
{{> section}}
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
@ -155,14 +155,18 @@ module.exports = function (opts) {
|
||||
if (type.type === 'NameExpression') {
|
||||
return html ? '<code>' + autolink(type.name) + '</code>' : type.name;
|
||||
} else if (type.type === 'UnionType') {
|
||||
return type.elements.map(formatType).join(' or ');
|
||||
return type.elements.map(function (element) {
|
||||
return formatType(element, html);
|
||||
}).join(' or ');
|
||||
} else if (type.type === 'AllLiteral') {
|
||||
return 'Any';
|
||||
} else if (type.type === 'OptionalType') {
|
||||
return '<code>[' + formatType(type.expression) + ']</code>';
|
||||
return '<code>[' + formatType(type.expression, html) + ']</code>';
|
||||
} else if (type.type === 'TypeApplication') {
|
||||
return formatType(type.expression) + '<' +
|
||||
type.applications.map(formatType).join(', ') + '>';
|
||||
type.applications.map(function (application) {
|
||||
return formatType(application, html);
|
||||
}).join(', ') + '>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user