« get me outta code hell

content, replacer: move warning splitting into replacer - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util/replacer.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-02-18 17:03:46 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-02-18 17:03:46 -0400
commit84290316071c23c35661f556a9959b86a33b8314 (patch)
treeece3ab38db08e66f1bd39f7a8c65ae4b27a07e3c /src/util/replacer.js
parenta4ba1bd41ca0a99e31595f6975a04e6718946984 (diff)
content, replacer: move warning splitting into replacer
Diffstat (limited to 'src/util/replacer.js')
-rw-r--r--src/util/replacer.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util/replacer.js b/src/util/replacer.js
index 8e6cac7..2c0e89f 100644
--- a/src/util/replacer.js
+++ b/src/util/replacer.js
@@ -495,11 +495,15 @@ export function postprocessImages(inputNodes) {
 
         if (attributes.get('link')) imageNode.link = attributes.get('link');
         if (attributes.get('style')) imageNode.style = attributes.get('style');
-        if (attributes.get('warning')) imageNode.warning = attributes.get('warning');
         if (attributes.get('width')) imageNode.width = parseInt(attributes.get('width'));
         if (attributes.get('height')) imageNode.height = parseInt(attributes.get('height'));
         if (attributes.get('pixelate')) imageNode.pixelate = true;
 
+        if (attributes.get('warning')) {
+          imageNode.warnings =
+            attributes.get('warning').split(', ');
+        }
+
         outputNodes.push(imageNode);
 
         // No longer at the start of a line after an image - there will at