Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Fix link splitting in lists #737

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

artcodespace
Copy link
Contributor

@artcodespace artcodespace commented Jun 28, 2023

Fixes #681
Closes element-hq/element-web#25379

Previously as described in the above issues, if you started a list, inserted a link, then tried to insert a new bullet point, the internal state of the rust model would be incorrect. This was due to the link being split into two parts, one of which was a link with no inner text.

This PR fixes that behaviour by using a pre-existing util function to remove empty link nodes, and adds tests for the problem as described in the linked issues.

@artcodespace artcodespace requested a review from a team June 28, 2023 14:13
@sonarcloud
Copy link

sonarcloud bot commented Jun 28, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Contributor

@jonnyandrew jonnyandrew left a comment

Choose a reason for hiding this comment

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

Woohoo great find! Thanks for the tests

@artcodespace artcodespace merged commit 4b9c2e1 into main Jun 28, 2023
@artcodespace artcodespace deleted the alunturner/fix-link-splitting-in-lists branch June 28, 2023 14:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text inserted at incorrect position for link in list Text inserted at incorrect position
2 participants