diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-06-15 15:02:47 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-06-15 15:03:19 -0300 |
commit | 592398c28b06a038b370aa217d4844fa2f47b470 (patch) | |
tree | 1c863a5c5e9911e9fa672315b5df37208e83174e /src/replacer.js | |
parent | 22741b22f195aece04b377d974e15b5d5d8c6f3d (diff) |
content: transformContent: media stuff
- misc max-width - <audio nameless> - <video inline> - align="full"
Diffstat (limited to 'src/replacer.js')
-rw-r--r-- | src/replacer.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/replacer.js b/src/replacer.js index c6aef6ef..bf28061c 100644 --- a/src/replacer.js +++ b/src/replacer.js @@ -673,12 +673,14 @@ export function postprocessImages(inputNodes) { export function postprocessVideos(inputNodes) { return postprocessHTMLTags(inputNodes, 'video', - attributes => { + (attributes, {inline}) => { const node = {type: 'video'}; node.src = attributes.get('src'); complainAboutMediaSrc(node.src); + node.inline = attributes.get('inline') ?? inline; + if (attributes.get('width')) node.width = parseInt(attributes.get('width')); if (attributes.get('height')) node.height = parseInt(attributes.get('height')); if (attributes.get('align')) node.align = attributes.get('align'); @@ -699,6 +701,7 @@ export function postprocessAudios(inputNodes) { node.inline = attributes.get('inline') ?? inline; if (attributes.get('align')) node.align = attributes.get('align'); + if (attributes.get('nameless')) node.nameless = true; return node; }); |