def require_paragraph(self):
        """Create a new paragraph unless the currently-active container
        is already a paragraph."""
        if self._containers and _is_paragraph(self._containers[-1]):
            return False
        else:
            self.start_paragraph()
            return True
Create a new paragraph unless the currently-active container
        is already a paragraph.
ipymd/lib/opendocument.py