Skip to content

Fenced code blocks do not receive pre tag #20

Open
@constantinevitt

Description

Suppose I have a database entry where I have the following "fenced code block"

(triple back tick)
some fenced code block
another line
(triple back tick)

I also have the following model method in django models.py

def get_markdown(self):
        return mark_safe(markdown(self.body))
        where body = models.TextField()

Then the result being returned by the method is the following html code...

<p><code>
some fenced code block
another line
</code></p>

The <pre> tag is missing and it also displays inline rather than receiving the line break.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions