Loading...
 
Skip to main content

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
(0)
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
  1. List Inside Paragraph Spacing
Importance
4
Easy to solve?
2
Priority
8
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
6738
Created
Friday 03 August, 2018 02:33:19 UTC
by Philippe Cloutier
LastModif
Saturday 06 July, 2024 10:21:44 UTC


Show PHP error messages