@staticmethod
def expr_linebreaks():
    """
        Converts line breaks to unix-style and removes extra breaks
        if found more than two in a row.

        >>> from typus import en_typus
        >>> en_typus('foo\\r\\nbar\\n\\n\\nbaz')
        'foo\\nbar\\n\\nbaz'
        """
    expr = ('\\r\\n', '\n'), ('\\n{2,}', '\n' * 2)
    return expr
