Skip to content

Commit

Permalink
merging in production
Browse files Browse the repository at this point in the history
  • Loading branch information
mogmarsh committed Feb 28, 2024
2 parents 3499c30 + 0356cf2 commit 28fc15e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/class-block-converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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] ),
};
}
Expand Down Expand Up @@ -291,6 +292,18 @@ protected function embed( string $url ): Block {
);
}

/**
* Create separator blocks.
*
* @return Block
*/
protected function separator(): Block {
return new Block(
block_name: 'separator',
content: '<hr class="wp-block-separator has-alpha-channel-opacity"/>'
);
}

/**
* Create HTML blocks.
*
Expand Down

0 comments on commit 28fc15e

Please sign in to comment.