facelessuser / MarkdownPreview

Markdown preview and build plugin for Sublime Text https://facelessuser.github.io/MarkdownPreview/
Other
405 stars 53 forks source link

conflict between markdown.extensions.footnotes and markdown.extensions.nl2br or escapeall #113

Closed vanleo2001 closed 4 years ago

vanleo2001 commented 4 years ago

When I use markdownpreview in sublime text3, I find the conflict between markdown.extensions.nl2br and markdown.extensions.footnotes.

I want to allow single newline to register as a hardbreak, so I enable the python-markdown extension nl2br. I also want to use ython-markdown extension footnotes. But if enbale both extensions, markdownpreview will not render footnotes correctly.

I trried python-markdown extension escapeall , it has the same error as nl2br.

picture1: both enabling extension footnotes and nl2br, footnotes render error snap1070

picture2: disabling extension nl2br, footnotes render ok snap1069

facelessuser commented 4 years ago

If there is an issue, the issue would either be in Python Markdown or pymdown-extensions, with the latter being the more likely case, with that said, it is probably more likely a user error, but I cannot determine without the actual Markdown source, not just a picture of the final render.

Please post the Markdown source so that I can determine where this issue actually belongs.

@gir-bot remove S: triage @gir-bot add S: more-info-needed

vanleo2001 commented 4 years ago

I use sublime text 3 (3211) x86 in win7 64bit. The encoding of markdown file is utf-8.

picture: simple markdown text for test snap1076

picture: All the configure of markdownpreview is default. Rendering footnotes is OK snap1072

picture: After enabling python-markdown extension nl2br, snap1073

picture: Rendering footnotes error. snap1074

picture: Footnotes are rendered as "\<a>" in html source snap1075

facelessuser commented 4 years ago

Please post a copy pastable examples of the source and of your configuration.

facelessuser commented 4 years ago

I have tried to reproduce and have absolutely no issues.

chrome_isVPwgydtG

Based on your picture above, you are only enabling markdown.extensions.nl2br and not enabling any other extensions, and since footnotes and escapeall, are both missing from your extensions setting, neither are enabled.

In short, this is a user error. When defining your own extension setup, you need to specify all extensions that you wish to enable as it overrides the defaults.

@gir-bot remove S: more-info-needed @gir-bot add T: support