From 2dc7825366ef5749a8ddd52e739fb09dad961e3f Mon Sep 17 00:00:00 2001 From: Ivan Paramonau Date: Fri, 20 Sep 2024 09:53:56 -0400 Subject: [PATCH] links: allow spaces in aspect-ratio attribute of Iframely --- plugins/links/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/links/utils.js b/plugins/links/utils.js index 631d67e29..7adfb4ed5 100644 --- a/plugins/links/utils.js +++ b/plugins/links/utils.js @@ -152,10 +152,10 @@ export default { if (media) { CONFIG.MEDIA_ATTRS.forEach(function(ma) { - var re = "(?:^|[^-])\\b" + ma + "\\s*:\\s*([\\d./:]+)(?:px)?\\b"; + var re = "(?:^|[^-])\\b" + ma + "\\s*:\\s*([\\d./:\\s]+)(?:px)?\\b"; var m = media.match(re); if (m) { - link[ma] = m[1]; + link[ma] = m[1].replace(/\s/g, ''); } }); }