

def build_preview(self):
    '\n        Build the preview by:\n\n        - Returning the lead attribut if not empty.\n        - Checking if a split marker is present in the content\n          Then split the content with the marker to build the preview.\n        - Splitting the content to a fixed number of words.\n        '
    if self.lead:
        return self.lead
    for splitter in self.splitters:
        if (splitter in self.content):
            return self.split(splitter)
    return self.truncate()

dataset/ETHPy150Open Fantomas42/django-blog-zinnia/zinnia/preview.py HTMLPreview.build_preview/original