Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown footnote reset issue #40

Closed
nzp opened this Issue Aug 16, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@nzp
Copy link

commented Aug 16, 2016

This is probably a documentation issue more than anything else. When configuring Markdown, the first instinct is probably to use a configured markdown.Markdown instance in MARKUP_FIELD_TYPES. However, Markdown instances need to be explicitly reset (Markdown.reset()) after rendering to avoid issues such as this Python-Markdown/markdown#401 (I tripped on this, so here I am).

markdown.markdown handles this automatically, so the proper way, probably, to go about this is to use django.utils.functional.curry (or own similar function) to wrap it (like you do when you're adding Pygments extension) and add configuration in MARKUP_FIELD_TYPES. This should probably be mentioned in documentation.

@jamesturk

This comment has been minimized.

Copy link
Owner

commented Aug 23, 2016

thanks for this report, had no idea! I'll look at getting a fix in next time I have a few spare cycles

jamesturk added a commit that referenced this issue Oct 6, 2016

@jamesturk jamesturk closed this Oct 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.