AppFlowy-IO / AppFlowy-IO/appflowy-editor

[Bug] Markdown: 3 or more images without a line break in a row do not get parsed correctly

Open
#1,113 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
684
Forks
329
PR merge metrics
No merged PRs in 30d

Description

### Bug Description

When there are n (n>2) images in a row and there is no line in between them, only the first image is being shown. This is related to the commit #1012 , which solves the issue of an image following a paragraph without an empty line, but it does not solve the issue of multiple images in a row.

### How to Reproduce

Try this markdown and use `markdownToDocument()`.

```markdown
## Case 1: Images on separate lines, no blank lines between

Only the **first image** renders below:

![Image 1](https://via.placeholder.com/100)
![Image 2](https://via.placeholder.com/100)
![Image 3](https://via.placeholder.com/100)

✅ If we add blank lines between them, all images render:

![Image A](https://via.placeholder.com/100)

![Image B](https://via.placeholder.com/100)

![Image C](https://via.placeholder.com/100)

---

## Case 2: All images in the same line (inline)

Only the **first image** renders:

![Inline 1](https://via.placeholder.com/100) ![Inline 2](https://via.placeholder.com/100) ![Inline 3](https://via.placeholder.com/100)
```

### Expected Behavior

One expects that all images load in any case.

### Operating System

Web (Windows)

### AppFlowy Editor Version(s)

5.2.0

### Screenshots

_No response_

### Additional Context

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.