rearrange pandoc transformer chain for efficiency