Remove paragraph from list items in table of contents #613
Labels
do not close
Issue which won't close due to inactivity
enhancement
New functionality or behavior
implemented
Change has been implemented
Milestone
Description
The generator for table of contents creates a paragraph for each list item:
commonmark/src/Extension/TableOfContents/TableOfContentsGenerator.php
Lines 108 to 111 in 37eb9a4
A list item can contain a
p
element and any other flow content but the list item element defines and creates already a physically separated block. And since only one single link is included at a time, there is no need to add another block.Regardless, additional spacing is added that needs to be removed to get a normal list design.
This will also help with most frontend frameworks as they also do not use paragraphs in navigation.
Current Behaviour
New Behaviour
The text was updated successfully, but these errors were encountered: