Skip to content

[Fix] Fixes editor crash (Resolves #2604) #2643

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

rutvik110
Copy link
Collaborator

@rutvik110 rutvik110 commented Apr 15, 2025

[Fix] Fixes editor crash (Resolves #2604)

The editor crash occuring during the placeholder insertion after an attributed text was result of a bug in markdown finder flow, findMarkdown within _UpstreamInlineMarkdownParser. The offset at which the placeholder was getting inserted, couple of places within the markdown finder were expecting a string at that offset but were receiving an instance of the placeholder resulting in a crash.

Fixed this by passing the plain text version of the attributedText before performing any operations that try to parse/work with the attributedText.

Demo:

Screen.Recording.2025-04-17.at.9.03.54.AM.mov

Remarks:

  • Some of the pubspec.lock files have been updated as a result of pub get operations.

@rutvik110 rutvik110 force-pushed the fix_2604_editor_crash branch 2 times, most recently from 87bc4bf to 1b84589 Compare April 19, 2025 09:04
@rutvik110 rutvik110 self-assigned this Apr 19, 2025
@rutvik110 rutvik110 force-pushed the fix_2604_editor_crash branch from 590ed89 to db797c5 Compare May 15, 2025 01:44
@rutvik110
Copy link
Collaborator Author

Notes on the newly added localization files:

This change is actually part of breaking changes to Flutter tooling which going forward won't generate the flutter_gen pacakge. Earlier, these package was used to store and import the generated symbols like localization files we see. But now, these generated files are supposed to be moved directly into the app source directory based on the configs set in l10n.yaml file.

That's why we've these new localization files showing up in the app directory on pub get on master. More details on the breaking change is here,
https://docs.flutter.dev/release/breaking-changes/flutter-generate-i10n-source

First seen in : Seen in master on v3.31.0-0.1.pre. Not yet released to stable.

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.

[BUG] - MarkdownInlineUpstreamSyntaxReaction crashes when a placeholder is inserted
1 participant