Skip to content

fix(android): span with background should show up inside blockquotes#253

Merged
hryhoriiK97 merged 4 commits intosoftware-mansion-labs:mainfrom
xindixu:feat/android-blockquote-container-background
Apr 24, 2026
Merged

fix(android): span with background should show up inside blockquotes#253
hryhoriiK97 merged 4 commits intosoftware-mansion-labs:mainfrom
xindixu:feat/android-blockquote-container-background

Conversation

@xindixu
Copy link
Copy Markdown
Contributor

@xindixu xindixu commented Apr 20, 2026

What/Why?

Text spans with background inside blockquotes don't have their background showing properly in Android.

  • Add SPAN_FLAGS_CONTAINER_BACKGROUND (max priority) so blockquote draws before lower-priority LineBackgroundSpans on the same line.
  • Implement LineBackgroundSpan on BlockquoteSpan and move fill from drawLeadingMargin to drawBackground; keep accent bars in drawLeadingMargin.
  • Unblocks inline chip/pill backgrounds rendering above blockquote fill.

Testing

Render code with background color inside blockquotes.

Screenshots

Before After
before fix after fix

PR Checklist

  • Code compiles and runs on iOS
  • Code compiles and runs on Android
  • Updated documentation/README if applicable
  • Ran example app to verify changes

Copy link
Copy Markdown
Collaborator

@hryhoriiK97 hryhoriiK97 left a comment

Choose a reason for hiding this comment

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

@xindixu thank you for the PR! I've left a few comments 🙂

Comment thread android/src/main/java/com/swmansion/enriched/markdown/spans/BlockquoteSpan.kt Outdated
Comment thread android/src/main/java/com/swmansion/enriched/markdown/spans/BlockquoteSpan.kt Outdated
xindixu added 4 commits April 22, 2026 14:26
…pan flags

- Add SPAN_FLAGS_CONTAINER_BACKGROUND (max priority) so blockquote draws
  before lower-priority LineBackgroundSpans on the same line.
- Implement LineBackgroundSpan on BlockquoteSpan and move fill from
  drawLeadingMargin to drawBackground; keep accent bars in drawLeadingMargin.
- Unblocks inline chip/pill backgrounds rendering above blockquote fill.

Made-with: Cursor
@xindixu xindixu force-pushed the feat/android-blockquote-container-background branch from 5d7e99a to 1192f25 Compare April 22, 2026 21:41
@xindixu
Copy link
Copy Markdown
Contributor Author

xindixu commented Apr 22, 2026

@hryhoriiK97 - Thank you for the review! I've addressed all your comments. Here's the updated screenshot after the fix. PTAL 😃

Screenshot 2026-04-22 at 2 40 15 PM

@xindixu xindixu requested a review from hryhoriiK97 April 23, 2026 05:54
Copy link
Copy Markdown
Collaborator

@hryhoriiK97 hryhoriiK97 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 Thanks for the contribution, @xindixu! This will go out in tomorrow's nightly release.

@hryhoriiK97 hryhoriiK97 merged commit 263310a into software-mansion-labs:main Apr 24, 2026
5 checks passed
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