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

Added support for nested img tags in html nodes #1485

Merged

Conversation

chiedo
Copy link

@chiedo chiedo commented Jul 12, 2017

While migrating some of my larger sites over to Gatsby I noticed that my initial solution for html image tags didn't work nested img tags.

This would work

<img .../> 

This would not work

<div>
<img .../>
</div> 

This should now work for both.

@KyleAMathews
Copy link
Contributor

@gatsbybot
Copy link
Collaborator

Deploy preview ready!

Built with commit 149441b

https://deploy-preview-1485--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

Deploy preview ready!

Built with commit 149441b

https://deploy-preview-1485--gatsbyjs.netlify.com

@gatsbybot
Copy link
Collaborator

Deploy preview ready!

Built with commit 149441b

https://deploy-preview-1485--gatsbygram.netlify.com

@KyleAMathews
Copy link
Contributor

This plugin is getting kinda complex but with no tests yet. Doesn't need to go in this PR but we need a way to mock gatsby-plugin-sharp so we can write tests with it. Perhaps just disable actually creating images when in test mode.

@chiedo
Copy link
Author

chiedo commented Jul 13, 2017

Haha agreed.

I just put that on my todo list after I finish moving my other sites to Gatsby 1.0 and then finish a couple small client projects that have been building up.

@KyleAMathews KyleAMathews merged commit 055d5e4 into gatsbyjs:master Jul 13, 2017
@KyleAMathews
Copy link
Contributor

Awesome thanks! Looking forward to the tests!!

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

Successfully merging this pull request may close these issues.

None yet

3 participants