Applying automated formatting rules