Skip to content

Commit

Permalink
Fix logic bug with blank line after empty list item
Browse files Browse the repository at this point in the history
  • Loading branch information
colinodell committed Jan 22, 2016
1 parent 15a80bf commit 4e29e1b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Block/Element/ListItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ public function isCode()

public function matchesNextLine(Cursor $cursor)
{
if ($cursor->isBlank() && $this->firstChild !== null) {
if ($cursor->isBlank()) {
if ($this->firstChild === null) {
return false;
}

$cursor->advanceToFirstNonSpace();
} elseif ($cursor->getIndent() >= $this->listData->markerOffset + $this->listData->padding) {
$cursor->advanceBy($this->listData->markerOffset + $this->listData->padding, true);
Expand Down

0 comments on commit 4e29e1b

Please sign in to comment.