« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/content/dependencies/transformContent.js3
-rw-r--r--src/util/replacer.js1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/content/dependencies/transformContent.js b/src/content/dependencies/transformContent.js
index 1bba16e3..757a9507 100644
--- a/src/content/dependencies/transformContent.js
+++ b/src/content/dependencies/transformContent.js
@@ -226,7 +226,7 @@ export default {
                 ? to('media.path', node.src.slice('media/'.length))
                 : node.src);
 
-            const {inline, link, width, height, pixelate} = node;
+            const {inline, link, width, height, style, pixelate} = node;
 
             if (inline) {
               return {
@@ -237,6 +237,7 @@ export default {
                     src && {src},
                     width && {width},
                     height && {height},
+                    style && {style},
 
                     pixelate &&
                       {class: 'pixelate'}),
diff --git a/src/util/replacer.js b/src/util/replacer.js
index 9544328f..00dfb800 100644
--- a/src/util/replacer.js
+++ b/src/util/replacer.js
@@ -494,6 +494,7 @@ 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('width')) imageNode.width = parseInt(attributes.get('width'));
         if (attributes.get('height')) imageNode.height = parseInt(attributes.get('height'));
         if (attributes.get('pixelate')) imageNode.pixelate = true;