Skip to content

images inside paragraphs #71

@lucianmarin

Description

@lucianmarin

<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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions