diff --git a/src/class-block-converter.php b/src/class-block-converter.php index 338bc12..af41919 100644 --- a/src/class-block-converter.php +++ b/src/class-block-converter.php @@ -97,6 +97,7 @@ public function __call( $name, $arguments ): ?Block { 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' => $this->h( $arguments[0] ), 'p', 'a', 'abbr', 'b', 'code', 'em', 'i', 'strong', 'sub', 'sup', 'span', 'u' => $this->p( $arguments[0] ), 'br', 'cite', 'source' => null, + 'hr' => $this->separator(), default => $this->html( $arguments[0] ), }; } @@ -237,6 +238,18 @@ protected function ol( DOMNode $node ): Block { ); } + /** + * Create separator blocks. + * + * @return Block + */ + protected function separator(): Block { + return new Block( + block_name: 'separator', + content: '
' + ); + } + /** * Create HTML blocks. *