From 98dd4b537c5c82cedf311b715581dc3d87373a51 Mon Sep 17 00:00:00 2001
From: Grischa Brockhaus <github@brockha.us>
Date: Wed, 14 Dec 2022 18:58:00 +0100
Subject: [PATCH] v.1.0.4: Support for upcoming imagegrid

---
 fancybox/createrelease | 2 --
 fancybox/fancybox.php  | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/fancybox/createrelease b/fancybox/createrelease
index 238828d6..d31f3a63 100755
--- a/fancybox/createrelease
+++ b/fancybox/createrelease
@@ -2,8 +2,6 @@ MODULE=fancybox
 
 cd ..
 
-# read actual version from module.json
-
 # old releases not needed anymore
 mkdir -p $MODULE/dist
 rm $MODULE/dist/*
diff --git a/fancybox/fancybox.php b/fancybox/fancybox.php
index 43219103..56503622 100644
--- a/fancybox/fancybox.php
+++ b/fancybox/fancybox.php
@@ -2,7 +2,7 @@
 /**
  * Name: Fancybox
  * Description: Open media attachments of posts into a fancybox overlay.
- * Version: 1.03
+ * Version: 1.04
  * Author: Grischa Brockhaus <grischa@brockha.us>
  */
 
@@ -47,7 +47,7 @@ function fancybox_render(App $a, array &$b){
 
 			// Local content images attached:
 			$text = preg_replace_callback(
-				'#<div class="body-attach">.*?</div>#s',
+				'#<div class="(body-attach|imagegrid-column)">.*?</div>#s',
 				function ($matches) use ($gallery) {
 					return str_replace('<a href', '<a data-fancybox="' . $gallery . '" href', $matches[0]);
 				},
-- 
2.39.5