From d19c8751345f2063fda116a03465a555bfe0e679 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 12 Mar 2019 11:50:16 -0700 Subject: [PATCH] cli: :arrow_up: rsass --- Cargo.lock | 6 +++--- cli/Cargo.toml | 2 +- cli/src/properties.rs | 22 ++++++++++++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8215ca3d..52e2c3c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -465,7 +465,7 @@ dependencies = [ [[package]] name = "rsass" -version = "0.9.6" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -653,7 +653,7 @@ dependencies = [ "rand 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rsass 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rsass 0.9.8 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -795,7 +795,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f" "checksum regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4e47a2ed29da7a9e1960e1639e7a982e6edc6d49be308a3b02daf511504a16d1" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" -"checksum rsass 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7a5dde55023a6c19470f7aeb59f75f897d8b80cbe00d61dfcaf7bbbe3de4c0a6" +"checksum rsass 0.9.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4534cc03040beacd2668621815f26fe57e5b7cfe085790f98e5e87c1612316" "checksum rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "bcfe5b13211b4d78e5c2cadfebd7769197d95c639c35a50057eb4c05de811395" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index b06f5c9d..037278fa 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -32,7 +32,7 @@ serde = "1.0" serde_derive = "1.0" regex-syntax = "0.6.4" regex = "1" -rsass = "0.9" +rsass = "0.9.8" [dependencies.tree-sitter] version = ">= 0.3.7" diff --git a/cli/src/properties.rs b/cli/src/properties.rs index a7dc9ec1..eae4a129 100644 --- a/cli/src/properties.rs +++ b/cli/src/properties.rs @@ -889,6 +889,28 @@ mod tests { ), ]) ); + + // Handle differently-formatted calls + let sheet2 = generate_property_sheet( + "foo.css", + " + a { + b: f(); + c: f( + g(h), + i, + \"j\", + 10 + ); + } + ", + ) + .unwrap(); + + assert_eq!( + query_simple(&sheet2, vec!["a"])["c"], + query_simple(&sheet, vec!["a"])["c"] + ); } #[test]