Closed markwoodhall closed 6 years ago
@fhd is there any update on this? I'm currently using a patched version and it would be great to not have to worry about that.
Sorry, I've been somewhat missing in action for my GitHub projects... Given how it's been a while, let me know if you've given up on having this merged, I'd understand. If you'd still like to have it merged, I'll happily review it :smile:
No problem at all. Sure, I'd be interested in getting it merged. It might need a bit of polish first though?
Probably not, I won't be able to do a good review since my Clojure has gotten rusty lately. I'll focus on making sure I understand the changes :smile:
Hi,
First, thanks for making clostache, I've used it in a few different projects so I appreciate the effort you've put in.
This pull requests is to create tests and an implementation for dotted access inside a section. Like so:
or
Its worth saying that I'm pretty new to Clojure, so I don't doubt that there is a better implementation available. This does work though and all of the tests pass. I'm happy if the implementation needs to change, I just needed to get it fixed.
I'd be interested to know your thoughts and eager to understand any improvements you can think of or any problems I might have unknowingly caused.
As a brief summary, what I've done is enabled the
data
passed intoconvert-path
to be valid for the given dot notation. I've done this by doing a(get-in data in-sections)
. I've derivedin-sections
based on the positioning of the dot notation within (nested)section nodes.I'd be interested to know if there is a better, more concise way to do this with a single regex matcher.
Cheers!