We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 830ac88 commit bda4309Copy full SHA for bda4309
1 file changed
src/lib/remark-hugo-shortcodes.ts
@@ -59,7 +59,7 @@ class ShortcodeRegistry {
59
const src = attrs.src || '';
60
const alt = this.escapeHtml(attrs.alt || '');
61
const width = attrs.width || '100%';
62
- const showCaption = attrs.showCaption !== 'false';
+ const showCaption = attrs.showCaption === 'true';
63
64
const imageHtml = `<img src="${src}" alt="${alt}" style="display: block; max-width: ${width}; height: auto; margin-left: auto; margin-right: auto; border-radius: 0.75rem;" />`;
65
const captionHtml = showCaption && alt ? `<p style="text-align: center; font-size: 0.875rem; color: #6b7280; margin-top: 0.5rem;">${alt}</p>` : '';
0 commit comments