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

image tag fails to render when surrounded by <center></center> #428

Closed
csharpgh opened this issue Sep 17, 2016 · 5 comments
Closed

image tag fails to render when surrounded by <center></center> #428

csharpgh opened this issue Sep 17, 2016 · 5 comments

Comments

@csharpgh
Copy link

if you surround a image reference such as Image with

it fails to convert the tag into an html reference to the image file.

@kminchev
Copy link

kminchev commented Sep 18, 2016

<center> is deprecated.

@jasperhabicht
Copy link

@kminchev this may be true, however, img will always fail to render when wrapped into a block element. So, also if you wrap an img in a figure tag, it won't be rendered.

Another rendering parser (Text::Markdown) works similarly and argues:

Markdown is not interpreted in HTML block-level elements, in order for chunks of pasted HTML (e.g. JavaScript widgets, web counters) to not be magically (mis)interpreted.

But, they allow for a work-around:

For selective processing of Markdown in some, but not other, HTML block elements, add a markdown attribute to the block element and set its value to 1, on or yes.

Maybe such a thing could be implemented in parsedown as well?

@cebe
Copy link
Contributor

cebe commented Mar 20, 2017

@otaka-san there is https://github.com/erusev/parsedown-extra for that.

@jasperhabicht
Copy link

@cebe Oh, great! I should have checked that before obviously … thanks! Didn't know.

@aidantwoods
Copy link
Collaborator

HTML will prevent markdown processing if it is included on the same line and the line starts with HTML (per CommonMark spec)

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

No branches or pull requests

5 participants