format code for attach style