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, ''); } }); }