fix(collection): wrap intro text in a div, not a p - #3332
Conversation
The collection block's intro `text` is rendered markdown (RenderString), which can be block-level (multiple paragraphs). Wrapping it in `<p>` is invalid — the inner block `<p>`s force the outer `<p>` closed, so any wrapper styling escapes. Use a `<div>`, matching the markdown block (which documents the same rationale). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
✅ Deploy Preview for academic-demo canceled.
|
|
Wow, your first PR! Welcome to the community! 🎉 Thank you for this contribution to open source and open research. It makes a huge impact for the thousands of innovators building with Hugo Blox. If you're wondering about next steps, please read our Contributor Guide for coding standards, how to run the project locally, and how to get help. We hope this is just the start of your journey with us. Let's build the future together! Join us on Discord to connect with the team and community. Awesome work, we'll take a look soon! ✨ |
|
This PR is stale because it has not had any recent activity. The resources of the project maintainers are limited, and so we are asking for your help. If you feel that the PR is still relevant in the latest release, consider making the PR easier to review and finding developers to help review the PR. Please be mindful that although we encourage PRs, we cannot expand the scope of the project in every possible direction. There will be requests that don't make the roadmap. This PR will automatically close soon if no further activity occurs. Thank you for your contributions. |
|
This is still relevant, keep open ^ |
The collection block's intro
textis rendered markdown (RenderString), which can be block-level (multiple paragraphs). Wrapping it in<p>is invalid — the inner block<p>s force the outer<p>closed, so any wrapper styling escapes.🚀 What type of change is this?
🎯 What is the purpose of this change?
The
collectionblock wraps its introtextin a<p>, buttextis rendered markdown(
RenderString) and can be block-level (multiple paragraphs). A<p>may only contain inlinecontent, so the inner block
<p>s force the outer<p>closed and any wrapper styling escapes.Before (main), with a two-paragraph intro:
After:
Fix. Use a
<div>. This is exactly what the markdown block already does(
blox/markdown/block.html), including a comment explaining it supports theproseclass andmultiple paragraphs — so this just brings the collection block in line with its sibling.
Verified on the
academic-cvstarter with a temporary two-paragraph collection intro: the fixedbuild nests the paragraphs inside a
<div>; the same content onmainproduced the invalid<p><p>…</p><p>…</p></p>.📸 Screenshots or Screencast (if applicable)
n/a — invalid-HTML fix; see the before/after markup above.
ℹ️ Documentation Check
📜 Contributor Agreement
Thank you for your contribution!