From d785463f81796cb98fb9b3b85c650ed0d1af7a76 Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Wed, 10 Dec 2025 09:50:15 -0800 Subject: [PATCH] [clang-doc] Align indentation in templates Indentation was inconsistent between the namespace and class templates. This patch assumes that `` is not indented. --- .../clang-doc/assets/class-template.mustache | 368 +++++++++--------- .../assets/namespace-template.mustache | 179 +++++---- .../clang-doc/mustache-separate-namespace.cpp | 1 - 3 files changed, 274 insertions(+), 274 deletions(-) diff --git a/clang-tools-extra/clang-doc/assets/class-template.mustache b/clang-tools-extra/clang-doc/assets/class-template.mustache index bbac3ffae02fb..1197e76ab553c 100644 --- a/clang-tools-extra/clang-doc/assets/class-template.mustache +++ b/clang-tools-extra/clang-doc/assets/class-template.mustache @@ -11,10 +11,10 @@ {{Name}} {{#Stylesheets}} - + {{/Stylesheets}} {{#Scripts}} - + {{/Scripts}} {{! Highlight.js dependency for syntax highlighting }} @@ -22,217 +22,219 @@ - +
+
+ +
+
+
+
+

{{TagType}} {{Name}}

+

Defined at line {{Location.LineNumber}} of file {{Location.Filename}}

+ {{#Description}} +
+ {{>Comments}} +
+ {{/Description}} +
+
{{#HasPublicMembers}} - -
  • -
      +
      +

      Public Members

      +
      {{#PublicMembers}} - +
      +
      {{Type}} {{Name}}
      + {{#MemberComments}} +
      + {{>Comments}} +
      + {{/MemberComments}} +
      {{/PublicMembers}} -
    -
  • +
    + {{/HasPublicMembers}} {{#ProtectedMembers}} - -
  • -
      +
      +

      Protected Members

      +
      {{#Obj}} - +
      +
      {{Type}} {{Name}}
      + {{#MemberComments}} +
      + {{>Comments}} +
      + {{/MemberComments}} +
      {{/Obj}} -
    -
  • +
    + {{/ProtectedMembers}} {{#HasPublicFunctions}} - -
  • -
      +
      +

      Public Methods

      +
      {{#PublicFunctions}} - + {{>FunctionPartial}} {{/PublicFunctions}} -
    -
  • - {{/HasPublicFunctions}} + + + {{/PublicFunctions}} {{#ProtectedFunction}} -
  • -
      - {{#Obj}} - - {{/Obj}} -
    -
  • + {{/ProtectedFunction}} {{#Enums}} - -
  • -
      +
      +

      Enumerations

      +
      {{#Obj}} - + {{>EnumPartial}} {{/Obj}} -
    -
  • + + {{/Enums}} - {{#Typedef}} - - {{/Typedef}} {{#Record}} - -
  • - - -
    -
    -
    -
    -

    {{TagType}} {{Name}}

    -

    Defined at line {{Location.LineNumber}} of file {{Location.Filename}}

    - {{#Description}} -
    - {{>Comments}} -
    - {{/Description}} -
    -
    - {{#HasPublicMembers}} -
    -

    Public Members

    -
    - {{#PublicMembers}} -
    -
    {{Type}} {{Name}}
    - {{#MemberComments}} -
    - {{>Comments}} -
    - {{/MemberComments}} -
    - {{/PublicMembers}} -
    -
    - {{/HasPublicMembers}} - {{#ProtectedMembers}} -
    -

    Protected Members

    -
    - {{#Obj}} -
    -
    {{Type}} {{Name}}
    - {{#MemberComments}} -
    - {{>Comments}} -
    - {{/MemberComments}} -
    - {{/Obj}} -
    -
    - {{/ProtectedMembers}} - {{#HasPublicFunctions}} -
    -

    Public Methods

    -
    - {{#PublicFunctions}} - {{>FunctionPartial}} - {{/PublicFunctions}} -
    -
    - {{/PublicFunctions}} - {{#ProtectedFunction}} -
  • - - {{/ProtectedFunction}} - {{#Enums}} -
    -

    Enumerations

    -
    - {{#Obj}} -{{>EnumPartial}} - {{/Obj}} -
    -
    - {{/Enums}} - {{#Record}} -
    -

    Inner Classes

    - -
    - {{/Record}} - {{#Typedef}} -
    -

    Enums

    -
    - {{/Typedef}} + {{#Typedef}} +
    +

    Enums

    +
    + {{/Typedef}} + - -
    + diff --git a/clang-tools-extra/clang-doc/assets/namespace-template.mustache b/clang-tools-extra/clang-doc/assets/namespace-template.mustache index 8a5be46aee28b..7fb66cadbb8e8 100644 --- a/clang-tools-extra/clang-doc/assets/namespace-template.mustache +++ b/clang-tools-extra/clang-doc/assets/namespace-template.mustache @@ -7,104 +7,103 @@ }} - - - {{NamespaceTitle}} - {{#Stylesheets}} - - {{/Stylesheets}} - {{#Scripts}} - - {{/Scripts}} - {{! Highlight.js dependency for syntax highlighting }} - - - - - - +
    +
    + + +
    +
    +
    + {{#HasEnums}} +
    +

    Enumerations

    +
    + {{#Enums}} + {{>EnumPartial}} + {{/Enums}} +
    +
    + {{/HasEnums}} + {{#HasRecords}} +
    +

    Inner Classes

    + +
    + {{/HasRecords}}
    -
    - + + + diff --git a/clang-tools-extra/test/clang-doc/mustache-separate-namespace.cpp b/clang-tools-extra/test/clang-doc/mustache-separate-namespace.cpp index add8a221feb40..cb0f9dc64bba6 100644 --- a/clang-tools-extra/test/clang-doc/mustache-separate-namespace.cpp +++ b/clang-tools-extra/test/clang-doc/mustache-separate-namespace.cpp @@ -25,7 +25,6 @@ namespace MyNamespace { // CHECK-GLOBAL-NEXT: // CHECK-GLOBAL-NEXT:
    // CHECK-GLOBAL-NEXT:
    -// CHECK-GLOBAL-EMPTY: // CHECK-GLOBAL-NEXT:
    // CHECK-GLOBAL-NEXT: // CHECK-GLOBAL-NEXT: