Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/ts/gallery.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/assets/ts/gallery.ts b/assets/ts/gallery.ts
index ec7c02d..218658d 100644
--- a/assets/ts/gallery.ts
+++ b/assets/ts/gallery.ts
@@ -67,6 +67,8 @@ class StackGallery {
/// This is done to allow inline images within paragraphs
const paragraph = img.closest('p');
+ if (!paragraph || !container.contains(paragraph)) continue;
+
if (paragraph.textContent.trim() == '') {
/// Once we insert figcaption, this check no longer works
/// So we add a class to paragraph to mark it