caveats: if the last character isn't a newline, add one

Closes #33962.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>