Merge branch 'master' into c-highlight
This commit is contained in:
commit
b89348e7fe
6 changed files with 33 additions and 8 deletions
|
|
@ -143,7 +143,9 @@ fn load_js_grammar_file(grammar_path: &Path) -> Result<String> {
|
|||
Some(code) => return Err(Error(format!("Node process exited with status {}", code))),
|
||||
}
|
||||
|
||||
Ok(String::from_utf8(output.stdout).expect("Got invalid UTF8 from node"))
|
||||
let mut result = String::from_utf8(output.stdout).expect("Got invalid UTF8 from node");
|
||||
result.push('\n');
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
fn ensure_file<T: AsRef<[u8]>>(path: &PathBuf, f: impl Fn() -> T) -> Result<()> {
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue