def _format_content(self, content):
        """Returns `content` with consecutive spaces converted to non-break
        spaces, and linebreak converted into HTML br elements.

        :param content: text to format
        :type content: `str`
        :rtype: `str`

        """
        content = re.sub(r'\n', '<br/>\n', content)
        content = re.sub(r'  ', '&#160;&#160;', content)
        content = re.sub(r'&#160; ', '&#160;&#160;', content)
        return content
def _format_content ( self , content ) : content = re . sub ( r'\n' , '<br/>\n' , content ) content = re . sub ( r'  ' , '&#160;&#160;' , content ) content = re . sub ( r'&#160; ' , '&#160;&#160;' , content ) return content
Returns `content` with consecutive spaces converted to non-break
        spaces, and linebreak converted into HTML br elements.

        :param content: text to format
        :type content: `str`
        :rtype: `str`