Improved line number formatting