Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Docs/Doxybook: Correctly set the indent level when rendering "Inherit…
Browse files Browse the repository at this point in the history
…ed from"

comments in synopses.
  • Loading branch information
brycelelbach committed Dec 24, 2021
1 parent 9c1c113 commit 51aaed6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions docs/doxybook_templates/class_members.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
{%- if exists("baseClasses") -%}{%- for base in baseClasses -%}
{%- if existsIn(base, "publicTypes") -%}
{%- for child in base.publicTypes -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- include "synopsis_type.tmpl" -%}
{%- set synopsis_needs_leading_line_break = true -%}
Expand All @@ -50,6 +51,7 @@
{%- if exists("baseClasses") -%}{%- for base in baseClasses -%}
{%- if existsIn(base, "publicClasses") -%}
{%- for child in base.publicClasses -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- include "synopsis_class.tmpl" -%}
{%- set synopsis_needs_leading_line_break = true -%}
Expand All @@ -68,6 +70,7 @@
{%- if existsIn(base, "friends") -%}
{%- for child in base.friends -%}
{%- if child.type == "class" or child.type == "struct" -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- include "synopsis_friend_class.tmpl" -%}
{%- set synopsis_needs_leading_line_break = true -%}
Expand All @@ -84,6 +87,7 @@
{%- if exists("baseClasses") -%}{%- for base in baseClasses -%}
{%- if existsIn(base, "publicAttributes") -%}
{%- for child in base.publicAttributes -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- include "synopsis_variable.tmpl" -%}
{%- set synopsis_needs_leading_line_break = true -%}
Expand All @@ -99,6 +103,7 @@
{%- if exists("baseClasses") -%}{%- for base in baseClasses -%}
{%- if existsIn(base, "publicFunctions") -%}
{%- for child in base.publicFunctions -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- include "synopsis_function.tmpl" -%}
{%- set synopsis_needs_leading_line_break = true -%}
Expand All @@ -117,6 +122,7 @@
{%- if existsIn(base, "friends") -%}
{%- for child in base.friends -%}
{%- if child.type != "class" and child.type != "struct" -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- include "synopsis_friend_function.tmpl" -%}
{%- set synopsis_needs_leading_line_break = true -%}
Expand All @@ -143,6 +149,7 @@
{%- if exists("baseClasses") -%}{%- for base in baseClasses -%}
{%- if existsIn(base, "protectedTypes") -%}
{%- for child in base.protectedTypes -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- include "synopsis_type.tmpl" -%}
{%- set synopsis_needs_leading_line_break = true -%}
Expand All @@ -158,6 +165,7 @@
{%- if exists("baseClasses") -%}{%- for base in baseClasses -%}
{%- if existsIn(base, "protectedClasses") -%}
{%- for child in base.protectedClasses -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- include "synopsis_class.tmpl" -%}
{%- set synopsis_needs_leading_line_break = true -%}
Expand All @@ -173,6 +181,7 @@
{%- if exists("baseClasses") -%}{%- for base in baseClasses -%}
{%- if existsIn(base, "protectedAttributes") -%}
{%- for child in base.protectedAttributes -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- include "synopsis_variable.tmpl" -%}
{%- set synopsis_needs_leading_line_break = true -%}
Expand All @@ -188,6 +197,7 @@
{%- if exists("baseClasses") -%}{%- for base in baseClasses -%}
{%- if existsIn(base, "protectedFunctions") -%}
{%- for child in base.protectedFunctions -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- include "synopsis_function.tmpl" -%}
{%- set synopsis_needs_leading_line_break = true -%}
Expand Down
4 changes: 3 additions & 1 deletion docs/doxybook_templates/synopsis_inherited_from.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<span class="doxybook-comment">{{ noop() -}}
{%- include "synopsis_indent.tmpl" -%}
{%- if default(synopsis_indent_width, 0) != 0 -%}
<code>{%- include "synopsis_indent.tmpl" -%}</code>
{%- endif -%}
/* Inherited from <code>{{ noop() -}}
<b><a href="{{ url }}">{%- include "name_qualified.tmpl" -%}</a></b>{{ noop() -}}
</code> */{{ noop() -}}
Expand Down

0 comments on commit 51aaed6

Please sign in to comment.