parameters: (string)
return_statement: return pycompat.to_text(string).replace('\n', M('<br>\n'))
docstring: Converts newlines to HTML linebreaks in ``string``. returns
      the unicode result
  
      :param str string:
      :rtype: unicode
docstring_summary: Converts newlines to HTML linebreaks in ``string``. returns
      the unicode result
docstring_tokens: Converts newlines to HTML linebreaks in string . returns the unicode result
function: def nl2br(string):
      """ Converts newlines to HTML linebreaks in ``string``. returns
      the unicode result
  
      :param str string:
      :rtype: unicode
      """
      return pycompat.to_text(string).replace('\n', M('<br>\n'))
function_tokens: def nl2br ( string ) : return pycompat . to_text ( string ) . replace ( '\n' , M ( '<br>\n' ) )