I have been trying to figure this one out on v1.3.2 for about an hour now and I think I've got a working version. I'm not able to test this properly but if someone else could, that would be awesome!
I know that neither of the codes quoted above work on my copy of Sword v1.3.2.
Sword:
[(v1.3.2)...