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: image migration issues #965

Merged
merged 5 commits into from
Sep 11, 2024
Merged

fix: image migration issues #965

merged 5 commits into from
Sep 11, 2024

Conversation

kellyjosephprice
Copy link
Collaborator

@kellyjosephprice kellyjosephprice commented Sep 10, 2024

PR App Ref RM-10799, RM-10667

🧰 Changes

Fixes some issues when migrating images.

  • mdast was sometimes not correctly populating image attributes. I tried to make it more normal, so the attributes are copied to both the node and the hProperties. 🤷

  • a null attribute could crash the transormers. I've added a null check, as well as filtered out empty attributes.

🧬 QA & Testing

This should probably be tested in the main app so we get the full integrations.

@kellyjosephprice kellyjosephprice marked this pull request as ready for review September 10, 2024 22:57
Copy link
Contributor

@rafegoldberg rafegoldberg left a comment

Choose a reason for hiding this comment

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

👌

processor/transform/readme-components.ts Show resolved Hide resolved
Comment on lines 69 to 70
if (typeof attr.value === 'string' || attr.value === null) {
memo[attr.name] = attr.value;
Copy link
Contributor

Choose a reason for hiding this comment

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

So we intentionally want to set the attribute to null here? May I ask why?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wasn't sure what to do with it. But I think it should actual set the value to true

@kellyjosephprice kellyjosephprice merged commit a30bc64 into next Sep 11, 2024
13 checks passed
@kellyjosephprice kellyjosephprice deleted the fix/image-migration branch September 11, 2024 21:27
rafegoldberg pushed a commit that referenced this pull request Sep 12, 2024
## Version 7.5.1

### 🛠 Fixes & Updates

* image migration issues ([#965](#965)) ([a30bc64](a30bc64))

<!--SKIP CI-->
@rafegoldberg
Copy link
Contributor

This PR was released!

🚀 Changes included in v7.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants