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

Does not convert text block that is wrapped in an html tag #293

Open
blitzmann opened this issue May 20, 2018 · 1 comment
Open

Does not convert text block that is wrapped in an html tag #293

blitzmann opened this issue May 20, 2018 · 1 comment
Labels

Comments

@blitzmann
Copy link

blitzmann commented May 20, 2018

import markdown2
markdowner = markdown2.Markdown()

text = markdowner.convert("<div>this is `text`</div>")
print (text)

This does not convert to <div>this is <code>text<code></div> as expected. Instead, it simply remains the input text.

WORKAROUND:

Add a space:

import markdown2
markdowner = markdown2.Markdown()
text = "<div>this is `text`</div>"
text = markdowner.convert(" "+text)
print (text)

But it should be documented that input text should not be completely wrapped, otherwise it won't work (discovered while working on #287 which required me to process text twice)

@mattbasta
Copy link

Have you tried the markdown-in-html extra?

https://github.com/trentm/python-markdown2/wiki/markdown-in-html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants