diff --git a/src/components/shortcodes/Spoiler.astro b/src/components/shortcodes/Spoiler.astro index 319f3f6..48b985d 100644 --- a/src/components/shortcodes/Spoiler.astro +++ b/src/components/shortcodes/Spoiler.astro @@ -1,9 +1,17 @@ --- const { tip = '' } = Astro.props +let divNeeded = false +const content = await Astro.slots.render('default') +if (content.includes('
')) {
+ divNeeded = true
+}
+
---
-
-