Repository navigation
Editor | Fix | Preserve underline marks when splitting a line - #3378
Open
dajiaohuang wants to merge 1 commit into
Open
dajiaohuang wants to merge 1 commit into
dajiaohuang wants to merge 1 commit into
Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
This branch has not been deployed
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.
Description
The renderer creates
core_ui.common.Underline, which implementsSpan, forMarkup.Mark.Underline. However,Editable.extractMarks()has no branch for this span and drops it throughelse -> null.EditorFragmentpasses this extraction intoonEnterKeyClicked, so the split-line operation loses underline marks while retaining bold and italic marks. The extraction is also used by text updates and backspace operations.Map
UnderlinetoMark.Type.UNDERLINE, retaining its start/end offsets just like the other formatting spans. Add a regression to the existingMarkupExtractTestthat renders and extracts an underline at a nonzero offset.What type of PR is this?
Related Tickets & Documents
Fixes #3323.
Testing results
git diff --check: passes.github.properties,apikeys.properties, or SDK configuration.settings.gradleunconditionally loads GitHub Packages credentials for the middleware dependency, and the native workflow uses repository secrets. No credentials were fabricated or copied and no user workspace/device was accessed. The new test is included for execution in the normal project environment.Mobile & Desktop Screenshots/Recordings
No layout changes. The reported behavior is documented in #3323; no device verification is claimed here.
Added tests?
should extract underline spanin the existing Robolectric suite (not run locally).Added to documentation?
AI assistance was used to prepare this narrowly scoped change and its source-path review.