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-copy-linked-files): replace checking parent node type to 'dir' #31780

Merged
merged 3 commits into from Jun 7, 2021

Conversation

lee1409
Copy link
Contributor

@lee1409 lee1409 commented Jun 5, 2021

Description

Remove checking whether parent node is File type so that even though the markdown node has different type of parent node, the plugin still can process it. Then, we just need to make sure its parent node has dir value to get directory path for the files.

This detail was posted at #31592

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jun 5, 2021
@lee1409 lee1409 marked this pull request as draft June 5, 2021 01:59
@lee1409 lee1409 force-pushed the improve-remark-copy-linked-files branch from bccae82 to 7298744 Compare June 7, 2021 04:07
@lee1409 lee1409 marked this pull request as ready for review June 7, 2021 07:06
@vladar vladar 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 Jun 7, 2021
Copy link
Contributor

@vladar vladar left a comment

Choose a reason for hiding this comment

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

Given the context in the linked discussion, let's get this merged. Thanks for the PR! 👍

@vladar vladar added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Jun 7, 2021
@gatsbybot gatsbybot merged commit e854dcf into gatsbyjs:master Jun 7, 2021
@vladar vladar added this to To cherry-pick in Release candidate via automation Jun 7, 2021
@lee1409 lee1409 deleted the improve-remark-copy-linked-files branch June 7, 2021 23:51
vladar pushed a commit that referenced this pull request Jun 8, 2021
…pe to 'dir' (#31780)

* remove checking parent node type

* fix the test cases

* add a new test case

(cherry picked from commit e854dcf)
@vladar vladar moved this from To cherry-pick to Backport PR opened in Release candidate Jun 8, 2021
gatsbybot pushed a commit that referenced this pull request Jun 8, 2021
…pe to 'dir' (#31780) (#31828)

* remove checking parent node type

* fix the test cases

* add a new test case

(cherry picked from commit e854dcf)

Co-authored-by: Lee Yee Run <leerun1409@gmail.com>
@vladar vladar moved this from Backport PR opened to Backported in Release candidate Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes topic: remark/mdx Related to Markdown, remark & MDX ecosystem
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants