Skip to content

Commit

Permalink
Hardbreak Node (#5)
Browse files Browse the repository at this point in the history
Added method to append an InlineHardbreak Node to InlineNodeBuilder.
  • Loading branch information
jrobinsonadrenaline authored Jan 5, 2024
1 parent 29a37dc commit 09a8579
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Builder/InlineNodeBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace DH\Adf\Builder;

use DH\Adf\Node\Inline\Emoji;
use DH\Adf\Node\Inline\Hardbreak;
use DH\Adf\Node\Inline\Mention;
use DH\Adf\Node\Node;

Expand All @@ -26,5 +27,12 @@ public function mention(string $mentionId, string $text, ?string $accessLevel =
return $this;
}

public function break(?Node $parent = null): self
{
$this->append(new Hardbreak($parent));

return $this;
}

abstract protected function append(Node $node): void;
}

0 comments on commit 09a8579

Please sign in to comment.