fix: duplicated extra-indentation removal caused invalid SASS syntax
This commit is contained in:
parent
e6ce31f675
commit
80d015627e
1 changed files with 1 additions and 8 deletions
|
|
@ -46,14 +46,7 @@ impl Parse for MacroSyntax {
|
||||||
fn parse(input: syn::parse::ParseStream) -> syn::Result<Self> {
|
fn parse(input: syn::parse::ParseStream) -> syn::Result<Self> {
|
||||||
let ident = input.parse::<Ident>()?;
|
let ident = input.parse::<Ident>()?;
|
||||||
let mode = input.parse::<ArbitraryStyleSyntax>()?;
|
let mode = input.parse::<ArbitraryStyleSyntax>()?;
|
||||||
let mut code = input.parse::<ArbitraryStyleBlock>()?;
|
let code = input.parse::<ArbitraryStyleBlock>()?;
|
||||||
|
|
||||||
// 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();
|
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
ident,
|
ident,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue