Skip to content

Commit

Permalink
Add svg icon support to Block Directory search result item. (#23442)
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenDufresne committed Jun 29, 2020
1 parent 284683c commit e956b87
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { BlockIcon } from '@wordpress/block-editor';
function DownloadableBlockIcon( { icon, title } ) {
return (
<div className="block-directory-downloadable-block-icon">
{ icon.match( /\.(jpeg|jpg|gif|png)(?:\?.*)?$/ ) !== null ? (
{ icon.match( /\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/ ) !== null ? (
<img
src={ icon }
alt={ sprintf(
Expand Down

0 comments on commit e956b87

Please sign in to comment.