structstruck
structstruck copied to clipboard
Add the capability of skipping strikethrough for subtrees
Add a new attribute named nostrike that allows you to skip subtrees for strikethrough.
initial discussion in #9
@jcaesar I think this does work, but not for subtrees yet.
(I guess we can ignore the possibility of attribute name collisions for now. Let's see if it ever comes to bite.)
There now is (or will very soon be) machinery for checking for attributes, and I'll rename strikethrough to structstruck::each.
Maybe you can add #[structstruck::exclude_each] or something based on that?
Ok! I was also keeping up with the conversation in the other issue so all good from my part.
I'm just a little swamped with work and end-of-year related things right now, so probably I'm going to take a look at this in January.
I've updated this to fit with current HEAD and added a test and minimal documentation. It'd be nice if you could give it a look before I merge it and release it as 0.5.
Ok, I'll take a look.
somewhat error prone to type (at least for me)
Heh, same. That's what I get for being punny.
Also does the current check_crate_attr supports aliasing the crate name to something shorter?
I'm not even sure there's a way to do that, the macros don't know about any use structstruck as foo;. I haven't tested what happens if you foo = { name = "structstruck", … } in your Cargo.toml, that might do something.
(I messed up a few pushes, I hope it's back to what it should be now.)