Fix bold text not rendering in Markdown lists#3228
Conversation
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>
a5aebb1 to
7fd06ac
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
…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>
📸 Snapshot Test1 modified, 581 unchanged
🛸 Powered by Emerge Tools |
tonidero
left a comment
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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 :/
There was a problem hiding this comment.
Regarding that, should we also pass in the textAlign property to the style here?
**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 -->
Summary
"2. numara aboneliğinizi şimdi başlatın"starts with"2. ", which CommonMark interprets as an ordered list itemMDOrderedListandMDBulletListwere pushing SpanStyles without including thefontWeightparameter, causing bold to be overridden by the default normal weight fromLocalTextStyle/MaterialThemeSee https://linear.app/revenuecat/issue/WEB-3876 for screenshots
Note
Low Risk
Low risk UI-only change that centralizes
TextStylemerging 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(includingfontWeight) as the surrounding Markdown.Refactors Markdown rendering to consistently compute a merged
resolvedTextStyle(via newresolveMarkdownTextStyle) for headings, paragraphs, and lists, and simplifiesMarkdownTextto accept a singleTextStyleinstead of per-attribute overrides.Written by Cursor Bugbot for commit 4849523. This will update automatically on new commits. Configure here.