remark-gfm: TypeError: Cannot read properties of undefined (reading 'inTable') in v4.0.0

Affected packages and versions

4.0.0

Link to runnable example

https://github.com/arechsteiner/gfm-bug/blob/main/src/App.tsx#L12

Steps to reproduce

Attempt to render

const test = `hello world \`call' hello world \`call'`

With

<ReactMarkdown remarkPlugins={[remarkGfm]}>
  {test}
</ReactMarkdown>

Expected behavior

Previously this was no issue.

Actual behavior

TypeError: Cannot read properties of undefined (reading 'inTable')

image

Runtime

No response

Package manager

yarn 1

OS

macOS

Build and bundle tools

Vite

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 23 (11 by maintainers)

Commits related to this issue

Most upvoted comments

A major version release is rolling out across all: unified, remark, rehype, and micromark packages. This includes both type changes (static analysis error) and changes to the parser (potential runtime error) if the major versions are mismatched.

@ky1ejs this issue, remark-gfm with react-markdown is resolved, and has been for a while.

There are 500+ unified packages being updated so:

  1. Be patient
  2. Be specific on which you are using

You (@ky1ejs) appear to be asking about remark-gfm with mdx, that is in progress currently, you can track the progress towards the next mdx release in the mdx repo itself.

You can make a PR to remark-preset-prettier, most likely.

Run npm why remark-gfm and look for who uses the the outdated version.

Hey @ChristianMurphy, thank you and everyone for the fantastic work here!

What’s a reasonable expectation to have for this to be resolved?

I noticed that it’s approaching 2 months since the initial major releases were made, so I wondered how much longer it will take for them to be in sync.

Thanks again!

remark-preset-prettier doesn’t have any dependencies.

@ChristianMurphy I’m a bit confused, how is this a duplicate of a typescript related issue? This is not a typescript error, this is a runtime error.