Skip to content

Conversation

@kellyjosephprice
Copy link
Collaborator

@kellyjosephprice kellyjosephprice commented May 22, 2024

PR App Fix RM-9827

🧰 Changes

Adds backwards compatibility with variables, glossary, and reusable content.

When we're trying to update a document from markdown to MDX, we first parse the document to an mdast using the old markdown library. Then we serialize it back to MDX with this version. Basically:

const mdx = rmdx.mdx(rdmd.mdast(doc))

But, because these types are now completely represented in JSX, we didn't have any custom compilers to handle them. This adds some compilers to write their nodes back out as JSX.

Callouts

Also, refactors how callouts are represented. Adds a prop to the node empty to represent if there's a heading a not. It's a bit more plumbing to get mdx to parse and execute props, so this leaves the heading as a child.

HTML Comments

To be able to migrate away, we need to replace html comments with JSX comments.

🧬 QA & Testing

@kellyjosephprice kellyjosephprice changed the base branch from next to beta May 22, 2024 23:14
@kellyjosephprice kellyjosephprice marked this pull request as ready for review May 22, 2024 23:15
Copy link
Member

@trishaprile trishaprile left a comment

Choose a reason for hiding this comment

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

goated

}
};

export default compatability;
Copy link
Contributor

Choose a reason for hiding this comment

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

😬 😬 😬 how do i break it to you that you spelled compatibility wrong 😬

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If spelling compatability like compat-ability is wrong, I don't want to be right.

@kellyjosephprice kellyjosephprice merged commit 6432be8 into beta May 23, 2024
@kellyjosephprice kellyjosephprice deleted the feat/compatability branch May 23, 2024 23:53
rafegoldberg pushed a commit that referenced this pull request May 23, 2024
## Version 6.75.0-beta.38

### ✨ New & Improved

* compatibility ([#881](#881)) ([6432be8](6432be8))

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

This PR was released!

🚀 Changes included in v6.75.0-beta.38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants