Stylistic consistency nit: `if (dot_after_newline) {` (note the spaces before and after paren)