Paywalls V2 (Android): inline/partial bold markdown (**word**) renders as literal asterisks — whole-node bold toggle works fine

Aperta
#1,968 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
android, markdown, react-native, typescript

Direzione di ricerca

Start by tracing the shared markdown-to-paragraph pipeline referenced in PR #4194, focusing on how mixed bold and regular runs are built for Android. Reproduce the supplied partial-bold example on a physical Android device, then verify that the asterisks disappear, only the intended phrase is bold, and whole-node bold still works.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

The RevenueCat Paywall Builder offers two distinct ways to get bold text:
(a) a component-level "Bold" style toggle that sets fontWeight for the ENTIRE
text node, and (b) inline markdown syntax (**word**) used to bold only
PART of a paragraph, leaving the rest of the sentence in regular weight.

On Android, (a) renders correctly. (b) does not — the literal **
characters are shown instead of the enclosed word/phrase being bolded,
whenever the bold markdown covers only part of a paragraph rather than the
whole text node.

Steps to reproduce

  1. In the RevenueCat dashboard Paywall Builder, on a plain-text component,
    type a sentence where only part of it should be bold via markdown, e.g.:
    **Nothing due today.** We'll remind you before your trial ends.
    (do NOT use the separate whole-node Bold style toggle — use inline **)
  2. Build and run on a real Android device.
  3. The literal **Nothing due today.** renders with visible asterisks
    instead of "Nothing due today." appearing bold and the rest regular.

Expected

Inline/partial bold markdown renders as a mixed-weight run within the
paragraph (bold segment + regular segment), matching the dashboard preview
and matching how the whole-node Bold toggle already renders correctly.

Actual

Literal ** characters appear in place of the intended bold segment. A
stray/garbled glyph also appears adjacent to the asterisks in our case
(possibly an unrelated paste artifact, noted for completeness only).

Environment

  • react-native-purchases / react-native-purchases-ui: 10.10.0
    (upgraded from 10.4.0 specifically to test whether this was already fixed —
    it was not)
  • Resolves to purchases-hybrid-common-ui 19.0.0 (purchases-android ~10.21.x)
  • Platform: Android, physical device
  • Not yet compared against iOS with identical paywall content

Additional context

This looks like it may be specific to building a MIXED-run AnnotatedString
(partial bold + partial regular within one paragraph) rather than applying a
single uniform style to a whole node — the whole-node Bold toggle sidesteps
this entirely since it never needs mixed runs. Flagging PR #4194
("Memoize Markdown parsing and paragraph text building", merged into
v10.21.0 — the exact version now in use) since it rewrites the shared
markdown-to-paragraph pipeline that would build these mixed runs, though
I haven't confirmed via bisection that it's a regression.

Lingua principale
TypeScript
Stelle
1.2k
Fork
127
Merge medio
1g 44m
PR unite (30g)
46

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di RevenueCat/react-native-purchases

Tutte le issue di RevenueCat/react-native-purchases

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.