fix: render inline markup correctly in HTML and Adoc#1186
Open
gennaroprota wants to merge 1 commit intocppalliance:developfrom
Open
fix: render inline markup correctly in HTML and Adoc#1186gennaroprota wants to merge 1 commit intocppalliance:developfrom
gennaroprota wants to merge 1 commit intocppalliance:developfrom
Conversation
✨ Highlights
🧾 Changes by Scope
🔝 Top Files
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1186 +/- ##
===========================================
+ Coverage 79.19% 79.22% +0.03%
===========================================
Files 308 308
Lines 32332 32352 +20
Branches 6493 6498 +5
===========================================
+ Hits 25606 25632 +26
+ Misses 4355 4349 -6
Partials 2371 2371
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://1186.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-29 14:09:07 UTC |
Five kinds of inline markup in doc comments (emphasis, highlight, subscript, superscript, and strikethrough) were not rendered correctly: - HTML output silently dropped the wrapping element, so emphasized text and the others appeared as bare text. - AsciiDoc output rendered all five as italics, which is correct for emphasis but semantically wrong for the others (e.g., a subscript appeared as italic text, not lowered). Both rendering paths now produce semantically appropriate markup: `<em>`, `<mark>`, `<sub>`, `<sup>`, `<del>` in HTML, and the matching constructs in AsciiDoc (with strikethrough using the role-based `[.line-through]#...#`, since AsciiDoc has no native syntax for it). Doc comments may now also use the HTML-tag form for these kinds (`<strong>`, `<mark>`, `<del>`, `<s>`, `<sub>`, `<sup>`) alongside the previously-supported `<em>`. This is what most users reach for when they need a tight notation (e.g., `H<sub>2</sub>O`); the Markdown-marker forms (`~text~`, `^text^`, `==text==`, `~~text~~`) require whitespace flanks, which makes compact chemistry/math notation awkward to express. Three other inline kinds (footnote-reference, image, and math) suffer from the same rendering issue but each requires its own non-trivial design decision and is left for separate fixes. Closes issue cppalliance#1185.
f0c0ddb to
35d81dc
Compare
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.
Five kinds of inline markup in doc comments (emphasis, highlight, subscript, superscript, and strikethrough) were not rendered correctly:
Both rendering paths now produce semantically appropriate markup:
<em>,<mark>,<sub>,<sup>,<del>in HTML, and the matching constructs in AsciiDoc (with strikethrough using the role-based[.line-through]#...#, since AsciiDoc has no native syntax for it).Doc comments may now also use the HTML-tag form for these kinds (
<strong>,<mark>,<del>,<s>,<sub>,<sup>) alongside the previously-supported<em>. This is what most users reach for when they need a tight notation (e.g.,H<sub>2</sub>O); the Markdown-marker forms (~text~,^text^,==text==,~~text~~) require whitespace flanks, which makes compact chemistry/math notation awkward to express.Three other inline kinds (footnote-reference, image, and math) suffer from the same rendering issue but each requires its own non-trivial design decision and is left for separate fixes.
Closes issue #1185.