neutronX / django-markdownx

Comprehensive Markdown plugin built for Django
https://neutronx.github.io/django-markdownx/
Other
863 stars 153 forks source link

Problem using Code formatting in Markdown #155

Closed vishvanath45 closed 4 years ago

vishvanath45 commented 5 years ago

I integrated django-markdownx in my project, Since I was working on a project which aims at helping upcoming programmers, I need to use code display function of markdownx, I seem to have problem using that.
Refer to image, I tried wrting the code, and it mixes up the formatting. markdownx-error

Can you tell me how to solve this formatting issue.

StanleyDerLurch commented 5 years ago

inside your virtual environment pip install pygments

# in your settiings file
MARKDOWNX_MARKDOWN_EXTENSIONS = [
    'markdown.extensions.codehilite',
]

Get a Pygments Style