Skip to content

Fix bold text not rendering in Markdown lists#3228

Merged
vegaro merged 4 commits into
mainfrom
cesar/web-3876-turkish-bold-text-does-not-render-on-android
Mar 16, 2026
Merged

Fix bold text not rendering in Markdown lists#3228
vegaro merged 4 commits into
mainfrom
cesar/web-3876-turkish-bold-text-does-not-render-on-android

Conversation

@vegaro

@vegaro vegaro commented Mar 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Fixes bold text not rendering when CommonMark parses text as an ordered or bullet list
  • The Turkish localization "2. numara aboneliğinizi şimdi başlatın" starts with "2. ", which CommonMark interprets as an ordered list item
  • MDOrderedList and MDBulletList were pushing SpanStyles without including the fontWeight parameter, causing bold to be overridden by the default normal weight from LocalTextStyle/MaterialTheme

See https://linear.app/revenuecat/issue/WEB-3876 for screenshots


Note

Low Risk
Low risk UI-only change that centralizes TextStyle merging for Markdown elements; main risk is small visual regressions in typography (e.g., font size/weight/align) across headings/paragraphs/lists.

Overview
Fixes Markdown bold text being lost inside ordered and bullet lists by ensuring list item marker/text uses the same resolved TextStyle (including fontWeight) as the surrounding Markdown.

Refactors Markdown rendering to consistently compute a merged resolvedTextStyle (via new resolveMarkdownTextStyle) for headings, paragraphs, and lists, and simplifies MarkdownText to accept a single TextStyle instead of per-attribute overrides.

Written by Cursor Bugbot for commit 4849523. This will update automatically on new commits. Configure here.

@vegaro vegaro requested review from a team as code owners March 12, 2026 16:55
When text starts with a pattern like "2. " (e.g., Turkish localization
"2. numara aboneliğinizi..."), CommonMark parses it as an ordered list.
The ordered list and bullet list code paths were not including the
fontWeight in their pushed SpanStyle, causing bold text to render as
normal weight.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vegaro vegaro force-pushed the cesar/web-3876-turkish-bold-text-does-not-render-on-android branch from a5aebb1 to 7fd06ac Compare March 12, 2026 16:56
@vegaro vegaro marked this pull request as draft March 12, 2026 16:56
@codecov

codecov Bot commented Mar 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.34%. Comparing base (dec91ef) to head (4849523).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3228   +/-   ##
=======================================
  Coverage   79.34%   79.34%           
=======================================
  Files         356      356           
  Lines       14276    14276           
  Branches     1945     1945           
=======================================
  Hits        11327    11327           
  Misses       2144     2144           
  Partials      805      805           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…endering

When text starts with a pattern like "2. " (e.g., Turkish localization
"2. numara aboneliğinizi..."), CommonMark parses it as an ordered list.
The ordered list and bullet list code paths were not including fontWeight,
fontSize, color, or fontFamily in their pushed SpanStyle, causing these
properties to be overridden by defaults from LocalTextStyle/MaterialTheme.

This aligns the list rendering paths with MDParagraph, which already
includes all these properties.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@emerge-tools

emerge-tools Bot commented Mar 13, 2026

Copy link
Copy Markdown

📸 Snapshot Test

1 modified, 581 unchanged

Name Added Removed Modified Renamed Unchanged Errored Approval
TestPurchasesUIAndroidCompatibility
com.revenuecat.testpurchasesuiandroidcompatibility
0 0 0 0 325 0 N/A
TestPurchasesUIAndroidCompatibility Paparazzi
com.revenuecat.testpurchasesuiandroidcompatibility.paparazzi
0 0 1 0 256 0 ✅ Approved

🛸 Powered by Emerge Tools

@vegaro vegaro marked this pull request as ready for review March 13, 2026 15:09
@vegaro vegaro requested a review from a team March 13, 2026 15:09

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly just a question, but I'm happy with this change for now. Thanks for fixing this! 🙏

color = color,
fontWeight = fontWeight,
fontSize = fontSize,
fontFamily = fontFamily,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm interesting... I guess this makes sense... I'm just wondering if there is a way we can make this to not forget to add other properties if needed.... Like maybe the TextStyle should already have all those properties at the top, and we just pass those in? Not sure how it behaves when the TextStyle has a different style than the parameters passed to the Text composable though, since it seems a bunch of them are duplicated in both places :/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding that, should we also pass in the textAlign property to the style here?

@vegaro vegaro added this pull request to the merge queue Mar 16, 2026
Merged via the queue into main with commit 7eceaca Mar 16, 2026
29 checks passed
@vegaro vegaro deleted the cesar/web-3876-turkish-bold-text-does-not-render-on-android branch March 16, 2026 12:18
github-merge-queue Bot pushed a commit that referenced this pull request Mar 16, 2026
**This is an automatic release.**

## RevenueCat SDK
### 🐞 Bugfixes
* Fix & Standardize Galaxy Date Parsing Edge Cases (#3216) via Will
Taylor (@fire-at-will)
* Fix addSuccessfullyPostedToken for new purchases in
PostPendingTransactionsHelper (#3239) via Facundo Menzella
(@facumenzella)
* [Galaxy]: Fix race condition when fetching Galaxy products (#3213) via
Will Taylor (@fire-at-will)
* Fixes double padding in PaywallActivity on Android 15+ when
`edgeToEdge` parameter is false (#3227) via Cesar de la Vega (@vegaro)

## RevenueCatUI SDK
### 🐞 Bugfixes
* Fix bold text not rendering in Markdown lists (#3228) via Cesar de la
Vega (@vegaro)
* Fix: Clear in-memory offerings cache on locale override to prevent
stale paywall data (#3225) via Antonio Pallares (@ajpallares)
### Paywallv2
#### ✨ New Features
* Feature: Update default paywall (#3133) via Jacob Rakidzich
(@JZDesign)
#### 🐞 Bugfixes
* Fix V2 paywall safe area in landscape mode (#3221) via Cesar de la
Vega (@vegaro)

### 🔄 Other Changes
* Run integration tests on all branches (#3242) via Toni Rico
(@tonidero)
* Migrate Firebase Test Lab jobs to CircleCI emulators (#3238) via Toni
Rico (@tonidero)
* Run metalava on galaxy module in test-galaxy job (#3235) via Will
Taylor (@fire-at-will)
* Add offering_id to custom paywall impression event (#3230) via Rick
(@rickvdl)
* Cache isAutoRenewing to detect subscription changes without
syncPurchases (#3198) via Facundo Menzella (@facumenzella)
* Bump fastlane-plugin-revenuecat_internal from `e146447` to `3e8c384`
(#3233) via dependabot[bot] (@dependabot[bot])

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk release housekeeping: version string bumps and
documentation/deployment path updates with no functional runtime logic
changes beyond the exposed version constant.
> 
> **Overview**
> Publishes the `9.26.0` release by removing `-SNAPSHOT` across
build/version metadata (root `VERSION_NAME`, `.version`,
`Config.frameworkVersion`, and sample/test app dependency pins).
> 
> Updates release documentation artifacts by adding the `9.26.0` notes
to `CHANGELOG.md`/`CHANGELOG.latest.md`, switching docs deployment in
CircleCI to sync `docs/9.26.0` to S3, and updating `docs/index.html` to
redirect to the new version.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
0a30a45. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants