mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-30 12:24:59 +00:00
Fix rendering of template parameters
This commit is contained in:
parent
2c84fa9ac9
commit
adb8e27db0
@ -101,6 +101,9 @@ def convert_return_type(d: Definition, node: et.Element) -> None:
|
|||||||
if len(parts) > 1:
|
if len(parts) > 1:
|
||||||
d.trailing_return_type = normalize_type(parts[1])
|
d.trailing_return_type = normalize_type(parts[1])
|
||||||
|
|
||||||
|
def render_param(param: Definition) -> str:
|
||||||
|
return param.type + (f' {param.name}' if len(param.name) > 0 else '')
|
||||||
|
|
||||||
def render_decl(d: Definition) -> None:
|
def render_decl(d: Definition) -> None:
|
||||||
text = ''
|
text = ''
|
||||||
if d.id is not None:
|
if d.id is not None:
|
||||||
@ -110,8 +113,7 @@ def render_decl(d: Definition) -> None:
|
|||||||
text += '<div>'
|
text += '<div>'
|
||||||
if d.template_params is not None:
|
if d.template_params is not None:
|
||||||
text += 'template <'
|
text += 'template <'
|
||||||
text += ', '.join(
|
text += ', '.join([render_param(p) for p in d.template_params])
|
||||||
[f'{p.type} {p.name}'.rstrip() for p in d.template_params])
|
|
||||||
text += '>\n'
|
text += '>\n'
|
||||||
text += '</div>'
|
text += '</div>'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user