Skip to content

Commit 12bbc1d

Browse files
committed
fix(HandlebarsGenerator): sync HTML helper templates
1 parent 3cce490 commit 12bbc1d

File tree

236 files changed

+14323
-15076
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+14323
-15076
lines changed

share/mrdocs/addons/generator/adoc/layouts/index.adoc.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
{{#if relfileprefix}}:relfileprefix: {{relfileprefix}}{{/if}}
33

44
[#{{sectionref}}]
5-
{{> (concat 'symbols' '/' (lookup symbol 'kind')) symbol=symbol}}
5+
{{> symbol symbol=symbol}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
xref:{{href}}[{{> @partial-block }}]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`{{> @partial-block }}`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
={{select level (repeat "=" level) (select @root.config.multipage "==" "=")}} {{> @partial-block }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{{> @partial-block }}
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{#if class}}[.{{class}}]#{{/if}}{{> @partial-block }}{{#if class}}#{{/if}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[{{#if cols}}cols={{cols}}{{/if}}]
2+
|===
3+
{{> @partial-block }}
4+
|===
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{> @partial-block }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| {{> @partial-block }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| {{> @partial-block }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{{> @partial-block }}
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{> @partial-block }}

share/mrdocs/addons/generator/adoc/partials/types/info-list.adoc.hbs

-11
This file was deleted.

share/mrdocs/addons/generator/adoc/partials/types/info-member.adoc.hbs

-9
This file was deleted.

share/mrdocs/addons/generator/adoc/partials/types/name-info.adoc.hbs

-7
This file was deleted.

share/mrdocs/addons/generator/adoc/partials/types/qualified-path.adoc.hbs

-8
This file was deleted.

share/mrdocs/addons/generator/adoc/partials/types/source.adoc.hbs

-2
This file was deleted.

share/mrdocs/addons/generator/adoc/partials/types/special-name-suffix.adoc.hbs

-9
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{> (concat 'symbols' '/' (lookup symbol 'kind')) symbol=symbol }}

share/mrdocs/addons/generator/adoc/partials/types/declarator-id.adoc.hbs share/mrdocs/addons/generator/common/partials/types/declarator-id.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{{else if (eq kind "guide")~}}
55
{{>types/declarator deduced nolink=nolink~}}
66
{{else~}}
7-
{{#if (and link.ref (not nolink))}}xref:{{link.ref}}[pass:[{{name}}]]{{else}}{{name}}{{/if~}}
7+
{{#if (and link.ref (not nolink))}}{{#>markup/a href=link.ref}}{{name}}{{/markup/a}}{{else}}{{name}}{{/if~}}
88
{{#if (or (eq template.kind "explicit") (eq template.kind "partial"))~}}
99
{{>types/template-args args=template.args nolink=nolink~}}
1010
{{/if~}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{{! List the "members" field of a symbol as a table with the symbol name and brief for each member. }}
2+
{{#if members}}
3+
{{#>markup/h level=(select @root.config.multipage 1 2)}}{{title}}{{/markup/h}}
4+
{{#>markup/table cols=2}}
5+
{{#>markup/thead}}
6+
{{#>markup/tr~}}
7+
{{#>markup/th}}Name{{/markup/th~}}
8+
{{#>markup/th}}Description{{/markup/th}}
9+
{{/markup/tr}}
10+
{{/markup/thead}}
11+
{{#>markup/tbody}}
12+
{{#each (sort_by members "name")}}
13+
{{>types/info-member .}}
14+
{{/each}}
15+
{{/markup/tbody}}
16+
{{/markup/table}}
17+
{{/if}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{{! Helper for "info-list": renders a symbol as a row in a table of members }}
2+
{{#>markup/tr~}}
3+
{{#>markup/td~}}
4+
{{#>markup/a href=ref}}{{#>markup/code}}{{>types/declarator-id . nolink=true}}{{/markup/code}}{{/markup/a}} {{>types/special-name-suffix .}}
5+
{{~/markup/td}}
6+
{{#>markup/td~}}
7+
{{#if (ne kind "overload")~}}
8+
{{~doc.brief}}
9+
{{else~}}
10+
{{#each (unique (pluck (pluck members "doc") "brief"))~}}
11+
{{.}}
12+
{{/each~}}
13+
{{/if}}
14+
{{~/markup/td}}
15+
{{~/markup/tr}}

share/mrdocs/addons/generator/html/partials/types/name-info.html.hbs share/mrdocs/addons/generator/common/partials/types/name-info.hbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
{{#if prefix~}}
33
{{>types/name-info prefix nolink=nolink~}}::
44
{{~/if~}}
5-
{{#if (or (eq name "see-below") (eq name "implementation-defined"))~}}_{{name}}_{{else~}}
6-
{{#if (and symbol.ref (not nolink))}}<a href="{{symbol.ref}}">{{name}}</a>{{else~}}
5+
{{#if (or (eq name "see-below") (eq name "implementation-defined"))~}}{{ str '_'}}{{name}}{{ str '_'}}{{else~}}
6+
{{#if (and symbol.ref (not nolink))}}{{#>markup/a href=symbol.ref}}{{name}}{{/markup/a}}{{else~}}
77
{{name}}{{/if}}{{#if args}}{{>types/template-args args=args nolink=nolink}}{{/if~}}{{/if~}}

share/mrdocs/addons/generator/html/partials/types/qualified-path.html.hbs share/mrdocs/addons/generator/common/partials/types/qualified-path.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
{{>types/qualified-path symbol=symbol.parent nolink=nolink~}}
55
{{else~}}
66
{{/if~}}
7-
{{#if symbol.name}}{{#if (not nolink)}}<a href="{{symbol.ref}}">{{symbol.name}}</a>{{else}}{{symbol.name}}{{/if}}::{{/if~}}
7+
{{#if symbol.name}}{{#if (not nolink)}}{{#>markup/a href=symbol.ref}}{{symbol.name}}{{/markup/a}}{{else}}{{symbol.name}}{{/if}}::{{/if~}}
88
{{/unless}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{!
2+
Renders where the symbol is declared with a link
3+
to the source file when the `base-url` config
4+
option is defined
5+
}}
6+
{{#>markup/p}}
7+
{{#>markup/span~}}
8+
Declared in {{#>markup/code~}}
9+
{{ str "<" }}{{#unless (and @root.config.base-url (eq dcl.kind "source"))~}}
10+
{{dcl.file}}
11+
{{~else~}}
12+
{{#>markup/a href=(concat @root.config.base-url dcl.file '#L' dcl.line)}}{{dcl.file}}{{/markup/a}}>
13+
{{~/unless~}}{{ str ">" }}
14+
{{~/markup/code}}
15+
{{~/markup/span}}
16+
{{/markup/p}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{{!
2+
Renders the name of the symbol with a suffix when
3+
the symbol is a special member (e.g., constructor,
4+
destructor, overload, variant member)
5+
}}
6+
{{#if (eq kind "overload")~}}
7+
{{>types/special-name-suffix (front members)}}
8+
{{~else if (eq kind "function")~}}
9+
{{#if (eq class "constructor")}}
10+
{{#>markup/span class="small"}}[constructor]{{/markup/span}}
11+
{{~else if (eq class "destructor")~}}
12+
{{#>markup/span class="small"}}[destructor]{{/markup/span}}
13+
{{~/if~}}
14+
{{else if (eq kind "field")~}}
15+
{{~#if isVariant~}}
16+
{{#>markup/span class="small"}}[variant member]{{/markup/span}}
17+
{{~/if~}}
18+
{{~/if}}
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
{{! The section with a symbol in single page output or the symbol page in multi page output }}
2-
{{> (concat 'symbols' '/' (lookup symbol 'kind')) symbol=symbol}}
2+
{{> symbol symbol=symbol}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<a href="{{href}}">{{> @partial-block }}</a>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<code>{{> @partial-block }}</code>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<h{{or level 3}}{{#if class}} class="{{class}}"{{/if}}>{{> @partial-block }}</h{{or level 3}}>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<p>
2+
{{> @partial-block }}
3+
4+
</p>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<span{{#if class}} class="{{class}}"{{/if}}>
2+
{{> @partial-block }}
3+
4+
</span>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<table style="table-layout: fixed; width: 100%;">
2+
{{> @partial-block }}
3+
4+
</table>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<tbody>
2+
{{> @partial-block }}
3+
4+
</tbody>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<td>
2+
{{> @partial-block }}
3+
4+
</td>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<th>{{> @partial-block }}</th>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<thead>
2+
{{> @partial-block }}
3+
4+
</thead>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<tr>
2+
{{> @partial-block }}
3+
4+
</tr>

share/mrdocs/addons/generator/html/partials/types/declarator-after.html.hbs

-16
This file was deleted.

share/mrdocs/addons/generator/html/partials/types/declarator-before.html.hbs

-18
This file was deleted.

share/mrdocs/addons/generator/html/partials/types/declarator-id.html.hbs

-11
This file was deleted.

share/mrdocs/addons/generator/html/partials/types/declarator.html.hbs

-6
This file was deleted.

share/mrdocs/addons/generator/html/partials/types/info-list.html.hbs

-23
This file was deleted.

share/mrdocs/addons/generator/html/partials/types/info-member.html.hbs

-15
This file was deleted.

share/mrdocs/addons/generator/html/partials/types/nested-name-specifier.html.hbs

-8
This file was deleted.

share/mrdocs/addons/generator/html/partials/types/source.html.hbs

-7
This file was deleted.

share/mrdocs/addons/generator/html/partials/types/special-name-suffix.html.hbs

-11
This file was deleted.

share/mrdocs/addons/generator/html/partials/types/template-arg.html.hbs

-9
This file was deleted.

share/mrdocs/addons/generator/html/partials/types/template-args.html.hbs

-5
This file was deleted.

0 commit comments

Comments
 (0)