Joining the entire output every time just to run a trailing regex seems to ignore several functions that already exist for this sort of decisionmaking (e.g., `just_added_newline`).