Fix collapseNewlines option returning undefined when set to false