From 012e29630fa0bddfd49faf97caf84585109e07ad Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 29 Dec 2024 13:53:25 -0400 Subject: replacer, content, css: videos in content text --- src/util/replacer.js | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'src/util') diff --git a/src/util/replacer.js b/src/util/replacer.js index 78b4a895..e3f5623e 100644 --- a/src/util/replacer.js +++ b/src/util/replacer.js @@ -599,6 +599,56 @@ export function postprocessImages(inputNodes) { return outputNodes; } +export function postprocessVideos(inputNodes) { + const outputNodes = []; + + for (const node of inputNodes) { + if (node.type !== 'text') { + outputNodes.push(node); + continue; + } + + const videoRegexp = /