From 9092aff8585b2946b97124b0ba32b7f9265897a8 Mon Sep 17 00:00:00 2001 From: Yiffy Dev Date: Fri, 1 Nov 2024 18:36:23 +0500 Subject: [PATCH] fix: duplicated extra-indentation removal caused invalid SASS syntax --- sabry_procmacro_impl/src/impls/sassy.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sabry_procmacro_impl/src/impls/sassy.rs b/sabry_procmacro_impl/src/impls/sassy.rs index 16fe436..42d1725 100644 --- a/sabry_procmacro_impl/src/impls/sassy.rs +++ b/sabry_procmacro_impl/src/impls/sassy.rs @@ -46,14 +46,7 @@ impl Parse for MacroSyntax { fn parse(input: syn::parse::ParseStream) -> syn::Result { let ident = input.parse::()?; let mode = input.parse::()?; - let mut code = input.parse::()?; - - // this is because of how parsing works. Need to find more elegant way though - // TODO: find a more elegant way - code.code = Regex::new("\n ") - .expect("BUG: failed to build regex for indentation SASS") - .replace_all(&code.code, "\n") - .to_string(); + let code = input.parse::()?; Ok(Self { ident,