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

images inside paragraphs #71

Open
lucianmarin opened this issue Jul 28, 2016 · 0 comments
Open

images inside paragraphs #71

lucianmarin opened this issue Jul 28, 2016 · 0 comments

Comments

@lucianmarin
Copy link

lucianmarin commented Jul 28, 2016

<p><img src="http://i.imgur.com/W9jw9sf.png" width="500" height="500" /><p>

When it gets converted to AMP using htm-to-article-json then article-json-to-amp the above code gets <img> tags stripped out. The problem comes from html-to-article-json. I think <p> tags should be treated as <div> tags since both are block elements by HTML standard.

This is standard syntax used by all Markdown converters and static site generators.

The below code replaces <p> with <div> and it works perfect as an example:

<div>test<img src="test.jpg" width="1" height="1" /></div>
<div><img src="test.jpg" width="1" height="1" /></div>
<div><img src="test.jpg" width="1" height="1" />test</div>
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

1 participant