From 016746fc4045b10e557f6e797ba65f16f5b54aef Mon Sep 17 00:00:00 2001 From: Mods HD <85879710+mods-hd@users.noreply.github.com> Date: Tue, 10 Sep 2024 00:21:00 +0700 Subject: [PATCH] Update index.js This should fix error given at https://github.com/jleeson/rollup-plugin-import-css/issues/24 (Not 100% sure) --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 961be66..efa848d 100644 --- a/src/index.js +++ b/src/index.js @@ -31,7 +31,7 @@ export default (options = {}) => { content = content.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g, ""); content = content.replace(/ {2,}/g, " "); content = content.replace(/ ([{:}]) /g, "$1"); - content = content.replace(/([{:}]) /g, "$1"); + content = content.replace(/([{:}])([^\-\s])/g, "$1 $2"); content = content.replace(/([;,]) /g, "$1"); content = content.replace(/ !/g, "!"); return content;