Skip to content

[Bug]: Markdown table crashes when a table cell contains plain text with an unescaped <x character while remarkMdx is enabled. #5006

Description

@Damon0820

Bug type

Regression (worked before, now fails)

Browser surface

No

Summary

Markdown table crashes when a table cell contains plain text with an unescaped < character while remarkMdx is enabled.

Public reproduction URL

No response

Steps to reproduce

Paste or import this Markdown:

| Dimension | Basis |
| --- | --- |
| Volume trend | a<b |

Expected behavior

The table should render normally, and the cell should contain a<b as plain text.

Actual behavior

The editor crashes with error: row.children is not iterable

Acceptance criteria

Markdown tables should not crash when a cell contains plain text like a<b.
Fallback Markdown parsing should keep the table node structure valid.
table.children should only contain table row nodes.

Plate / Slate / React versions

Operating system

macOS

Install method

No response

Framework / app setup

React 18 app

Affected packages or entry points

@platejs/markdown @platejs/table

Minimal code or config excerpt

MarkdownPlugin.configure({
  options: {
    remarkPlugins: [remarkGfm, remarkMdx],
  },
});

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions