lstrip strips newlines

(cherry picked from commit 02235a0cec908ba4da27f49cdcbc739cfb4a9995)