-
-
Notifications
You must be signed in to change notification settings - Fork 556
Closed
Labels
Description
Operating system
Fedora 41
Eleventy
3.0.0
Describe the bug
When you have a for loop and list of at least 2 elements from collection and render content of that collection, you end up with <p> inside <p> and when you add IdAttributePlugin in config you end up with empty <p></p> at the end of each list item.
NOTE: When there is only one element in the list, the <p> tags are correct. But when there are at least two elements in the list, the text before {{ post.content }} have its own <p> tag that makes the issue visible.
Reproduction steps
- clone repo https://github.com/jcubic/eleventy-p-tag
npm installnpx @11ty/eleventy --serve- empty
<p></p>in every list item
Expected behavior
No extra <p></p> tag at the end.
No <p> inside <p>.
Reproduction URL
https://github.com/jcubic/eleventy-p-tag
Screenshots
Additional Notes
The project use Liquid templates. You can comment out the adding of IdAttributePlugin to observer nested <p> tag. I'm not sure if they are valid HTML.
