RocketChat / RocketChat/Rocket.Chat.ReactNative

bug: Markdown Image not rendering correctly

Open
#6,239 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🐛 bug
Dominant language
TypeScript
Stars
2.4k
Forks
1.5k
Avg merge
1d 18h
Merged PRs (30d)
90

Description

Describe the Bug

Image is rendering on top of the rest of the content.

Steps to Reproduce
const mdText = `${lineBreakText} ![alt text](https://play.google.com/intl/en_us/badges/images/badge_new.png)`

export const Image = () => (
	<View style={styles.container}>
		<Markdown msg={mdText} />
		<View style={{ height : 1, backgroundColor : 'red' }} />
		<RNText>{lineBreakText} <RNImage source={{ uri: 'https://play.google.com/intl/en_us/badges/images/badge_new.png' }} style={{ width: 100, height: 100 }} /></RNText>
	</View>
);

I've added a red line to display where Markdown ends and where the Text sample starts.

Expected Behavior

No response

Actual Behavior
Image
Rocket.Chat Server Version

any

Rocket.Chat App Version

4.58.0

Device Name

any

OS Version

any

Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with app/containers/markdown/Markdown.stories.tsx at the referenced Image story and inspect MarkdownImage in Storybook. Reproduce the layout with the provided markdown and compare it with the RNText/RNImage sample. Done means the markdown image no longer renders on top of the content that follows.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.