def newlines_to_spaces(text):
newline_pattern = re.compile('<STR_LIT>')<EOL>return newline_pattern.sub('<STR_LIT:U+0020>', text)<EOL>
Strips newlines and any spacing surrounding the newlines and replaces them with a single space
:param text: The text to parse
:type  text: str