Skip to content

Commit

Permalink
Add potential fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanzweifel committed Jul 2, 2023
1 parent 1b15e93 commit e8fa894
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Renderer/Block/ListItemRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ public function render(Node $node, ChildNodeRendererInterface $childRenderer): s
ListItem::assertInstanceOf($node);

$contents = $childRenderer->renderNodes($node->children());

/**
if (str_contains($contents, "\n")) {
$contents = str_replace("\n", " ", $contents);
}
*/

if (str_starts_with($contents, '<') && ! $this->startsTaskListItem($node)) {
$contents = "\n" . $contents;
}
Expand Down

0 comments on commit e8fa894

Please sign in to comment.