Skip to content

text: Enable mixed bold/italic markdown rendering#2350

Open
Third-Thing wants to merge 2 commits intolongbridge:mainfrom
Third-Thing:markdown-nested-emphasis-marks
Open

text: Enable mixed bold/italic markdown rendering#2350
Third-Thing wants to merge 2 commits intolongbridge:mainfrom
Third-Thing:markdown-nested-emphasis-marks

Conversation

@Third-Thing
Copy link
Copy Markdown
Contributor

@Third-Thing Third-Thing commented May 8, 2026

The markdown preview did not show text correctly when bold and italic were used together. For example, text marked as both bold and italic could lose one of those styles.

The solution keeps the existing text styles when nested markdown is parsed, then adds the outer style to the same text. This lets combined styles, such as bold plus italic, render correctly in the preview. (Closes #2120)

Tested in gpui-component-story --example markdown

_italic_ *italic*
**bold** __bold__
***bold and italic*** ___bold and italic___
_**bold and italic**_ *__bold and italic__*
*italic with **bold*** _italic with __bold___
_italic **with** bold_ *italic __with__ bold*
**bold with *italic*** __bold with _italic___
__bold *with* italic__ **bold _with_ italic**
Screenshot_20260508_122144

Implemented-by: Codex GPT-5.5
Reviewed-by: Claude Opus 4.7 and Human

@madcodelife
Copy link
Copy Markdown
Member

Thanks! I tested the styles inside the markdown reference are still not preserved. Could you handle this in the same PR?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Markdown: nested bold+italic (***text***) loses inner formatting

2 participants