fix: stop auto-brief extraction at headings#1179
Open
gennaroprota wants to merge 1 commit intocppalliance:developfrom
Open
fix: stop auto-brief extraction at headings#1179gennaroprota wants to merge 1 commit intocppalliance:developfrom
gennaroprota wants to merge 1 commit intocppalliance:developfrom
Conversation
When a symbol's documentation begins with a `@par Title` block (with no front matter text before it), parsing emits a `HeadingBlock` for the title followed by a `ParagraphBlock` for the body. The auto-brief pass walked past the heading looking for the first paragraph, promoted the `@par` body to the brief, and left the title rendered as a section with no content. The fix is to stop iterating at the first HeadingBlock: content under a heading is the body of that section, not the symbol's introductory prose. This is tightly scoped---`HeadingBlock` is only emitted from `@par` today--- and preserves the existing behavior when a front matter is present. The commit adds a regression test covering both shapes (no front matter, and explicit brief paragraph before the `@par` section). Closes issue cppalliance#1162.
✨ Highlights
🧾 Changes by Scope
🔝 Top Files
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1179 +/- ##
===========================================
+ Coverage 78.85% 79.09% +0.23%
===========================================
Files 308 309 +1
Lines 32157 46239 +14082
Branches 6456 6457 +1
===========================================
+ Hits 25359 36574 +11215
- Misses 4436 7301 +2865
- Partials 2362 2364 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
An automated preview of the documentation is available at https://1179.mrdocs.prtest2.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-04-22 09:24:23 UTC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a symbol's documentation begins with a
@par Titleblock (with no front matter text before it), parsing emits aHeadingBlockfor the title followed by aParagraphBlockfor the body. The auto-brief pass walked past the heading looking for the first paragraph, promoted the@parbody to the brief, and left the title rendered as a section with no content.The fix is to stop iterating at the first HeadingBlock: content under a heading is the body of that section, not the symbol's introductory prose. This is tightly scoped---
HeadingBlockis only emitted from@partoday--- and preserves the existing behavior when a front matter is present.The commit adds a regression test covering both shapes (no front matter, and explicit brief paragraph before the
@parsection).Closes issue #1162.