document before/after

@splattael 
@grosser Are you sure about the scope of @dir? Is it visible inside it block?