next-cms-ghost icon indicating copy to clipboard operation
next-cms-ghost copied to clipboard

Upgrade Rehype

Open nring opened this issue 3 years ago • 2 comments

I noticed an issue when trying to include an inline link in my Ghost Markdown (this is an [inline link](#inline-link)). Ghost sends down the htmlAst properly formatted but the rendered html is improperly formatted. I believe this is an issue to an old version of rehype/rehype-react. There were some significant type changes in the upgraded major versions of each library and I haven't been able to verify that upgrading will indeed fix the problem. However, the new packages add type support for React 18 elements among other things.

nring avatar Jun 16 '22 17:06 nring

Yes, I noticed the changes in the rehype/rehype-react packages. Unfortunately, they dropped common js support and moved everything to mjs. While the latter is the future, it did not work seamlessly with Next.js. I will revisit this issue, the next time I update the package dependencies.

styxlab avatar Jun 28 '22 08:06 styxlab

Sounds good - thank you for taking a look! I actually found the source of the issue I was having, and it's separate from Rehype so I'll open a separate issue for that.

nring avatar Jun 28 '22 10:06 nring