Skip to content

Conversation

@evelez7
Copy link
Member

@evelez7 evelez7 commented Nov 20, 2025

A </section> tag wasn't inside the {{#HasRecords}} Mustache tag, which caused a
mismatch if there weren't any records to render.

@evelez7 evelez7 marked this pull request as ready for review November 20, 2025 22:58
Copy link
Member Author

evelez7 commented Nov 20, 2025

@llvmbot
Copy link
Member

llvmbot commented Nov 20, 2025

@llvm/pr-subscribers-clang-tools-extra

Author: Erick Velez (evelez7)

Changes

A &lt;/section&gt; tag wasn't inside the {{#HasRecords}} Mustache tag, which caused a
mismatch if there weren't any records to render.


Full diff: https://github.com/llvm/llvm-project/pull/168966.diff

1 Files Affected:

  • (modified) clang-tools-extra/clang-doc/assets/namespace-template.mustache (+1-1)
diff --git a/clang-tools-extra/clang-doc/assets/namespace-template.mustache b/clang-tools-extra/clang-doc/assets/namespace-template.mustache
index f4a35cfe4c79a..614023b9f6723 100644
--- a/clang-tools-extra/clang-doc/assets/namespace-template.mustache
+++ b/clang-tools-extra/clang-doc/assets/namespace-template.mustache
@@ -97,8 +97,8 @@
                             </li>
                         {{/Records}}
                         </ul>
-                    {{/HasRecords}}
                     </section>
+                    {{/HasRecords}}
                 </div>
             </div>
         </main>

Copy link
Member Author

evelez7 commented Nov 20, 2025

If you inspect the HTML, you can see the mismatch in the pre-fix output: https://erickvelez.com/clang-doc-mustache-output/section-mismatch/GlobalNamespace/

Here is the fixed output: https://erickvelez.com/clang-doc-mustache-output/pr168966/GlobalNamespace/

@evelez7 evelez7 requested review from ilovepi and petrhosek November 20, 2025 23:02
@github-actions
Copy link

🐧 Linux x64 Test Results

  • 3053 tests passed
  • 7 tests skipped

Copy link
Contributor

@ilovepi ilovepi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Took me a minute to realize I needed to check the raw source over using the inspection tool to see the diff.

Can you add a test case?

@evelez7 evelez7 force-pushed the users/evelez7/clang-doc-namespace-section-mismatch branch from 9dc79f2 to 0cd3d59 Compare November 21, 2025 18:07
Copy link
Contributor

@ilovepi ilovepi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, modulo a small tweak tot he check line.

A `</section>` tag wasn't inside the `{{#HasRecords}}` Mustache tag, which caused a
mismatch if there weren't any records to render.
@evelez7 evelez7 force-pushed the users/evelez7/clang-doc-namespace-section-mismatch branch from 0cd3d59 to c82802e Compare November 21, 2025 19:12
Copy link
Member Author

evelez7 commented Nov 21, 2025

Merge activity

  • Nov 21, 7:30 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Nov 21, 7:32 PM UTC: @evelez7 merged this pull request with Graphite.

@evelez7 evelez7 merged commit 52f9a57 into main Nov 21, 2025
10 checks passed
@evelez7 evelez7 deleted the users/evelez7/clang-doc-namespace-section-mismatch branch November 21, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants