-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from ProspectiveCo/fix-var-regression
Fix regression in transitive var import
- Loading branch information
Showing
9 changed files
with
56 additions
and
12 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// ┌───────────────────────────────────────────────────────────────────────────┐ | ||
// │ │ | ||
// │ ██████╗ ██████╗ ██████╗ Copyright (C) 2022, The Prospective Company │ | ||
// │ ██╔══██╗██╔══██╗██╔═══██╗ │ | ||
// │ ██████╔╝██████╔╝██║ ██║ This file is part of the Procss library, │ | ||
// │ ██╔═══╝ ██╔══██╗██║ ██║ distributed under the terms of the │ | ||
// │ ██║ ██║ ██║╚██████╔╝ Apache License 2.0. The full license can │ | ||
// │ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ be found in the LICENSE file. │ | ||
// │ │ | ||
// └───────────────────────────────────────────────────────────────────────────┘ | ||
|
||
use crate::ast::Ruleset::{self}; | ||
use crate::ast::*; | ||
|
||
pub fn remove_var(css: &mut Css) { | ||
let reduced = css | ||
.iter() | ||
.filter(|&ruleset| match ruleset { | ||
Ruleset::QualRule(QualRule(name, Some(val))) if val.strip_prefix(':').is_some() => { | ||
false | ||
} | ||
_ => true, | ||
}) | ||
.cloned(); | ||
|
||
*css = crate::ast::Css(reduced.collect()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters