liquid-rust
liquid-rust copied to clipboard
feat(lib): Implement Jekyll's version of sort
Part of #311
@limeschool : posting this to keep you updated.
Thanks for working on this, @epage! If I was actually capable of writing decent code, I would've made a PR myself.
Apologies if I came off as whiny earlier, and thanks, really.
Want to finish this? I'm trying to wrap up another project before I focus on liquid/cobalt (so I can better focus).
The main other thing to know is the function try_find
I'm working on other things right now myself, but I will give it a looking at once I learn how to write tests (I'm really amateur, haha) and once I've looked at how everything works in this crate.
but I will give it a looking at once I learn how to write tests (I'm really amateur, haha)
The PR includes some of Jekyll's tests being ported with Rust with the remaining ones partially ported and commented out. Comparing the original tests with the ones that I already ported should get you most of the way there.
As for the other parts, the surrounding glue is written, just the implementation needs writing. As a hint`
let args = self.args.evaluate(runtime)?;
takes SortArgs and constructs a derive-constructed struct that has property: Option<str>, nils: Option<str>. So you can just do args.property and args.nils.