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

fix(gatsby-remark-images): support resolving markdown images from child nodes #28093

Merged
merged 6 commits into from
May 3, 2022

Conversation

rburgst
Copy link
Contributor

@rburgst rburgst commented Nov 16, 2020

  • in case where remark nodes are created from other nodes
    (e.g. gatsby-plugin-json-remark) the parent node
    of a remark document is not a file.
  • in order to resolve the images still, it is necessary
    to go up the parent chain until the closest File node

Fixes #28094

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Nov 16, 2020
@LekoArts LekoArts added topic: remark/mdx Related to Markdown, remark & MDX ecosystem and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Nov 16, 2020
@rburgst
Copy link
Contributor Author

rburgst commented Nov 25, 2020

any chance to get this reviewed?

@rburgst
Copy link
Contributor Author

rburgst commented Dec 7, 2020

still waiting for feedback

KyleAMathews
KyleAMathews previously approved these changes Dec 7, 2020
Copy link
Contributor

@KyleAMathews KyleAMathews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 from me

@rburgst
Copy link
Contributor Author

rburgst commented Dec 8, 2020

rebased on current master, hoping that the patch builds through now

@rburgst
Copy link
Contributor Author

rburgst commented Dec 8, 2020

@KyleAMathews I am not sure what to do, the build-test failures do not appear to be related to my changes

@rburgst
Copy link
Contributor Author

rburgst commented Jan 9, 2021

Anyone home?

…ld nodes

- in case where remark nodes are created from other nodes
  (e.g. gatsby-plugin-json-remark) the parent node
  of a remark document is not a file.
- in order to resolve the images still, it is necessary
  to go up the parent chain until the closest File node
@KyleAMathews
Copy link
Contributor

Tested the PR against @rburgst's reproduction and the image is now processed correctly:

Screen Shot 2022-05-02 at 12 40 20 PM

So this looks ready to go in assuming tests pass now with updated snapshots.

@KyleAMathews
Copy link
Contributor

Thanks again @rburgst for this PR and I'm very sorry it's taken so long to get merged.

imjoshin
imjoshin previously approved these changes May 2, 2022
Copy link
Contributor

@imjoshin imjoshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As Kyle said, sorry this took so long to get to. Thanks for your contribution! 😄

KyleAMathews
KyleAMathews previously approved these changes May 2, 2022
Copy link
Contributor

@KyleAMathews KyleAMathews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@KyleAMathews KyleAMathews dismissed stale reviews from imjoshin and themself via b876a62 May 2, 2022 19:59
@imjoshin imjoshin merged commit 496cb5d into gatsbyjs:master May 3, 2022
@imjoshin
Copy link
Contributor

imjoshin commented May 3, 2022

Failing tests were unrelated, merged! Thanks again! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: remark/mdx Related to Markdown, remark & MDX ecosystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[gatsby-remark-images] inline images are not resolved for child-nodes
4 participants