def strip_linebreaks(text):
    """Turn double linebreaks into a single.

    :param text: the text to perform the replacement within
    :returns: the text stripped of extra linebreaks

    """
    return text.replace("\n\n", "\n")