Skip to content

Conversation

@TaduJR
Copy link
Contributor

@TaduJR TaduJR commented Dec 21, 2025

Details

When combining bold formatting with emojis (e.g., *bold 😀 text*), the web platform displays duplicate emoji characters and causes cursor positioning issues.

The excludeRangeTypesFromFormatting function splits markdown ranges at emoji boundaries to prevent overlapping ranges. This was being called for italic and strikethrough, but bold was missing. The web DOM builder uses nested elements that cannot handle overlapping ranges correctly, causing text duplication.

This PR adds bold to the excludeRangeTypesFromFormatting calls alongside italic and strikethrough.

Native platforms are unaffected because they use a flat styling approach that handles overlapping ranges gracefully.

Related Issues

#746
Expensify/App#75294

Manual Tests

  1. Paste text with 4 asterisks around it: Test 😊
  2. Add one underscore _ at the start (left)
  3. Add 2 underscores at the start (left)
  4. Remove one underscore → even more emojis appear
  5. Add 4 underscores at the start (left)
  6. Verify that Adding _ or removing _ start (left), should not create extra emojis or move the cursor.

Linked PRs

@jmusial
Copy link
Collaborator

jmusial commented Dec 22, 2025

will take a look later today

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.

2 participants