Wiki syntax: Lists inside (larger) paragraphs are rendered as outside
- Status
- Open
- Subject
- Wiki syntax: Lists inside (larger) paragraphs are rendered as outside
- Version
- 15.x
- Category
- Bug
- Feature
- Wiki Syntax (text area, parser, external wiki, etc)
- Resolution status
- New
- Submitted by
- Philippe Cloutier
- Lastmod by
- Philippe Cloutier
- Rating
- Description
Tiki's syntax allows paragraphs with ordered or unordered lists. For example, the following dummy list items are inside this first paragraph:
- Dummy item 1
- Dummy item 2
Unfortunately, since r28616, parsing such a paragraph generates an HTML P element followed by a distinct HTML UL or OL element. These are rendered as distinct elements, split by as much space as 2 distinct P elements. This can be seen for example in this blog post, stored in Tiki 15 as of 2018-07-31.Ironically, this problem happens when feature_wiki_paragraph_formatting is enabled, and not when it is disabled. But there is still a problem when feature_wiki_paragraph_formatting is disabled, because as pointed out by Jonny Bradley, the p element cannot contain list elements in HTML 5. This is explicitly documented in the second note of https://www.w3.org/TR/html5/grouping-content.html#the-p-element
As reverting the change would make HTML invalid, the proper solution would be to either hack some CSS which avoids the p element's bottom margin when it is followed by some lists, or to use the div element instead of the p element, as shown in the HTML specification.
- Files
- Importance
- 4
- Easy to solve?
- 2
- Priority
- 8
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 6738
- Created
- Friday 03 August, 2018 02:33:19 UTC
by Philippe Cloutier - LastModif
- Saturday 06 July, 2024 10:21:44 UTC