Rewrite markup