Updated that add_event API can support newline literally.