Improved formatting for javascript blocks (with correction)