Skip to content

Bold text is not rendered correctly after inline code in the same paragraph #991

@frank-pexx

Description

@frank-pexx

Bug

Bold text is not rendered correctly when it appears after inline code in the same paragraph.

Reproduction

This markdown:

`getforecast_24h` **当前时刻的实测功率分项**

does not render the **...** part as bold.

But if I split it into two paragraphs:

`getforecast_24h`

**当前时刻的实测功率分项**

the bold text renders correctly.

Minimal example

import React from "react";
import { ScrollView } from "react-native";
import { useMarkdown } from "react-native-marked";

export default function Demo() {
  const elements = useMarkdown("`getforecast_24h` **当前时刻的实测功率分项**");
  // const elements = useMarkdown("`getforecast_24h`\n\n **当前时刻的实测功率分项**"); // correct
  return <ScrollView>{elements}</ScrollView>;
}

Expected

当前时刻的实测功率分项 should render in bold.

Actual

The bold style is not visually applied.

Notes

The markdown syntax is valid, and the parser tokenizes it correctly as codespan + strong.

Environment

  • react-native-marked: 8.0.1
  • React Native: 0.81.5
  • Expo: 54

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions