From c308769580169a85a6c01a5150bfb48d8d5e1aab Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 18 Feb 2024 16:52:45 -0400 Subject: replacer, content: allow warning attribute on image nodes --- src/content/dependencies/transformContent.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/content') diff --git a/src/content/dependencies/transformContent.js b/src/content/dependencies/transformContent.js index 757a9507..84881016 100644 --- a/src/content/dependencies/transformContent.js +++ b/src/content/dependencies/transformContent.js @@ -226,9 +226,16 @@ export default { ? to('media.path', node.src.slice('media/'.length)) : node.src); - const {inline, link, width, height, style, pixelate} = node; - - if (inline) { + const { + link, + style, + warning, + width, + height, + pixelate, + } = node; + + if (node.inline) { return { type: 'image', inline: true, @@ -259,6 +266,11 @@ export default { height: height ?? null, thumb: slots.thumb, + warnings: + (warning + ? warning.split(', ') + : null), + attributes: [ {class: 'content-image'}, -- cgit 1.3.0-6-gf8a5