fix blockquote styling and tests for bold text rendering#128
Open
vsaase wants to merge 1 commit intoforesightmobile:mainfrom
Open
fix blockquote styling and tests for bold text rendering#128vsaase wants to merge 1 commit intoforesightmobile:mainfrom
vsaase wants to merge 1 commit intoforesightmobile:mainfrom
Conversation
|
There's a nice reviewed fix at: https://github.com/jusbrasil/flutter_markdown_plus/pull/1/changes. Comparing both PRs, the one linked is neater (fewer code changes, no changes to deps). FYI to the maintainers here. |
Author
|
Your linked PR is shorter because it simply ignores |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix blockquote inline formatting (bold, italic, links)
Blockquotes were ignoring inline styles — bold, italic, and link colors inside a > blockquote all rendered without their expected formatting.
Root cause: In MarkdownBuilder.visitText, the blockquote check short-circuited to styleSheet.blockquote instead of _inlines.last.style, discarding any styles accumulated by nested strong/em/a elements.
Changes:
builder.dart — _addParentInlineIfNeeded now seeds the inline element with the blockquote base style when inside a blockquote; visitText always uses _inlines.last.style (the accumulated style chain).
blockquote_test.dart — Updated the "should work with styling" test to assert correct bold/italic/link rendering; added a dedicated test for bold text inside a blockquote.
Note: this merge request was almost completely made with Claude and Github CoPilot