Skip to content

editor.markdownToBlocks parse incorrectly #226

@Adonis0123

Description

@Adonis0123
const markdown = `
- 📝 item1
- ⚙️ item2
- 🔗 item3

# h1
`
const blocks: Block[] = await editor.markdownToBlocks(markdown);
console.log(blocks, "blocks");

I get the blocks.length is 3 , it seems look like lost # h1

however, when the # h1 is in the top

const markdown = `
# h1
- 📝 item1
- ⚙️ item2
- 🔗 item3
`
const blocks: Block[] = await editor.markdownToBlocks(markdown);
console.log(blocks, "blocks");

I get the blocks.length is 4 , it can correctly parsed # h1 and list

codesandbox

Is this a bug?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingprio:midMedium priority

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions