From fe2b3102523484a61a589360482dcd26f0f8f92e Mon Sep 17 00:00:00 2001 From: ashwin-pc Date: Tue, 9 Apr 2019 15:06:11 -0400 Subject: [PATCH] wrapped anchor tag around the image and caption --- packages/block-library/src/gallery/index.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/block-library/src/gallery/index.js b/packages/block-library/src/gallery/index.js index 4387f9a5e7083..f618dbb1ded4e 100644 --- a/packages/block-library/src/gallery/index.js +++ b/packages/block-library/src/gallery/index.js @@ -207,16 +207,18 @@ export const settings = { break; } - const img = {; + const figure = ( +
+ { + { ( image.caption && image.caption.length > 0 ) ? ( + + ) : null } +
+ ); return (
  • -
    - { href ? { img } : img } - { image.caption && image.caption.length > 0 && ( - - ) } -
    + { href ? { figure } : figure }
  • ); } ) }