1
+ {{!--
2
+ Renders the qualified symbol in the format used in titles
3
+
4
+ Titles use a format where all parent namespaces are linked to their documentation.
5
+ A parent is included only if it has a name. Unnamed namespaces are not included.
6
+
7
+ In general, the last symbol name is then appended to the linked namespaces without
8
+ any link because it represents the current symbol. However, there are some
9
+ exceptions to that:
10
+
11
+ - If the symbol is a conversion operator, the conversion type is linked.
12
+ - If the symbol is a template specialization, the primary template is linked
13
+ and the links to the arguments are appended to the name.
14
+ - In other cases, the symbol name text is used without any links.
15
+
16
+ Expected Context: {Symbol Object}
17
+
18
+ Example:
19
+ {{> symbol/title-qualified-name symbol }}
20
+
21
+ See: https://mrdocs.com/docs/mrdocs/develop/generators.html#dom_reference
22
+ --}}
23
+ {{ ~#if (and parent parent.parent )~}}
24
+ {{~> symbol/qualified-name-title parent is-qualified-name-parent =true ~}} {{ #if parent.name }} ::{{ /if }}
25
+ {{ ~/if ~}}
26
+ {{ ~#if (and (eq kind " function" ) (eq functionClass " conversion" ))~}}
27
+ {{~> symbol/name . ~}}
28
+ {{ ~else if is-qualified-name-parent ~}}
29
+ {{!~ If this is a parent, we only print it if it really has a name ~}}
30
+ {{ ~#if name ~}}
31
+ {{~> symbol/name . ~}}
32
+ {{ ~/if ~}}
33
+ {{ ~else if (eq kind "guide")~}}
34
+ {{> type/declarator deduced nolink =false ~}}
35
+ {{ ~else if (contains (arr "explicit" "partial") template.kind)~}}
36
+ {{!~ If the last part is a template specialization, we include links to primary template and the arguments. ~}}
37
+ {{!~ If the primary template wasn't correctly extracted for some reason, we just print the name as usual. ~}}
38
+ {{ #if template.primary }} {{~> symbol/name template.primary ~}} {{ else }} {{ name }} {{ /if }} {{> template/args args =template.args nolink =false ~}}
39
+ {{ ~else ~}}
40
+ {{~> symbol/name-text . ~}}
41
+ {{ ~/if ~}}
0 commit comments