-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[flutter_markdown] Fix WidgetSpan Support in MarkdownElementBuilder #6225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PTAL @stuartmorgan |
This will need to pass CI; please see the failing checks for details. |
(In the future, please don't remove the checklist from the PR description; it's there for a reason.) |
@stuartmorgan All checks pass now |
@domesticmouse I have implemented the parent child style matching. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL @tarrinneal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one quick change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
flutter/packages@0625827...2aa6e3f 2024-03-05 [email protected] [in_app_purchase_storekit] Fix type of error code returned from native code in `SKReceiptManager.retrieveReceiptData` (flutter/packages#6265) 2024-03-05 [email protected] [video_player] Fix typo in readme (flutter/packages#6264) 2024-03-05 [email protected] [pigeon] Separates message call code generation into separate methods in the SwiftGenerator (flutter/packages#5959) 2024-03-05 [email protected] [flutter_markdown] Fix WidgetSpan Support in MarkdownElementBuilder (flutter/packages#6225) 2024-03-04 [email protected] [webview_flutter] Make WebKitWebViewWidget unit tests stateless (flutter/packages#6228) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#6225) This pull request addresses a critical issue identified in the `flutter_markdown` package, specifically relating to the handling of `WidgetSpan` elements within `Text.rich` elements when utilized inside `MarkdownElementBuilder`s. Prior to this fix, the inclusion of `WidgetSpan` instances within markdown content led to casting issues, disrupting the normal rendering flow of the markdown content. Key Changes: - Resolved casting problems associated with using `WidgetSpan` inside `Text.rich` elements by refining the type handling and span merging logic within the affected functions. - Thoroughly commented and cleaned up the code within the error-prone functions to enhance readability and maintainability, ensuring that future modifications can be made more easily. - Adjusted existing tests to align with the newly introduced span merging logic, which is now more efficient and produces more predictable outcomes. - Introduced new tests specifically designed to cover scenarios where `WidgetSpan` elements are included within markdown content, ensuring that this issue does not resurface in future updates. The adjustments made in this pull request ensure that developers utilizing the `flutter_markdown` package can now seamlessly incorporate `WidgetSpan` elements within their markdown content without encountering the previously observed casting issues. This fix not only improves the package's robustness but also expands its flexibility, allowing for richer text compositions within markdown. This pull request closes issue [#144383](flutter/flutter#144383), effectively addressing the reported bug and enhancing the overall functionality of the `flutter_markdown` package. I'm welcoming feedback and suggestions for improvement. Fixed issues: * [#144383](flutter/flutter#144383)
…lutter#6225) This pull request addresses a critical issue identified in the `flutter_markdown` package, specifically relating to the handling of `WidgetSpan` elements within `Text.rich` elements when utilized inside `MarkdownElementBuilder`s. Prior to this fix, the inclusion of `WidgetSpan` instances within markdown content led to casting issues, disrupting the normal rendering flow of the markdown content. Key Changes: - Resolved casting problems associated with using `WidgetSpan` inside `Text.rich` elements by refining the type handling and span merging logic within the affected functions. - Thoroughly commented and cleaned up the code within the error-prone functions to enhance readability and maintainability, ensuring that future modifications can be made more easily. - Adjusted existing tests to align with the newly introduced span merging logic, which is now more efficient and produces more predictable outcomes. - Introduced new tests specifically designed to cover scenarios where `WidgetSpan` elements are included within markdown content, ensuring that this issue does not resurface in future updates. The adjustments made in this pull request ensure that developers utilizing the `flutter_markdown` package can now seamlessly incorporate `WidgetSpan` elements within their markdown content without encountering the previously observed casting issues. This fix not only improves the package's robustness but also expands its flexibility, allowing for richer text compositions within markdown. This pull request closes issue [#144383](flutter/flutter#144383), effectively addressing the reported bug and enhancing the overall functionality of the `flutter_markdown` package. I'm welcoming feedback and suggestions for improvement. Fixed issues: * [#144383](flutter/flutter#144383)
This pull request addresses a critical issue identified in the
flutter_markdown
package, specifically relating to the handling ofWidgetSpan
elements withinText.rich
elements when utilized insideMarkdownElementBuilder
s. Prior to this fix, the inclusion ofWidgetSpan
instances within markdown content led to casting issues, disrupting the normal rendering flow of the markdown content.Key Changes:
WidgetSpan
insideText.rich
elements by refining the type handling and span merging logic within the affected functions.WidgetSpan
elements are included within markdown content, ensuring that this issue does not resurface in future updates.The adjustments made in this pull request ensure that developers utilizing the
flutter_markdown
package can now seamlessly incorporateWidgetSpan
elements within their markdown content without encountering the previously observed casting issues. This fix not only improves the package's robustness but also expands its flexibility, allowing for richer text compositions within markdown.This pull request closes issue #144383, effectively addressing the reported bug and enhancing the overall functionality of the
flutter_markdown
package.I'm welcoming feedback and suggestions for improvement.
Fixed issues: