liquid-rust
liquid-rust copied to clipboard
`compact` filter doesn't properly work on hashes
Example test:
let assigns = v!({
"words": ["a", nil, "b", nil, "c"],
"hashes": [{ "a": "A" }, { "a": nil }, { "a": "C" }],
});
// Test hashes
assert_template_result!(
"A C",
"{{hashes | compact: 'a' | map: 'a' | join}}",
assigns
);
- Rust implementation
- Ruby implementation
- Relevant tests
- Once this is working, ideally the test will start failing. We would just need to remove the
#[should_panic]on it - If the test doesn't start failing, please temporarily remove
#[should_panic], and find or create an issue for the new failure
- Once this is working, ideally the test will start failing. We would just need to remove the
This solves issues #335. It also solves some of issue #246, but the filter doesn't yet work on a single hash.