nl: if line ends with a new line character substitute width incremented by integer 1 for max_width, if not substitute width for max_width.
code: max_width = min ( ( line . endswith ( '\n' ) and width + 1 or width ) , width )