Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: remove lookbehind when parsing HTML #693

Merged
merged 1 commit into from
Dec 28, 2024

Conversation

AkesiSeli
Copy link
Collaborator

@AkesiSeli AkesiSeli commented Dec 28, 2024

Technical details

This PR removes the appendLineIfNeeded extension function on AnnotatedString.Builder because it contains a lookbehind operation which could lead to potential crashes.

Additional notes

HTML parsing comes from the early stages of the development of this app and contains some workarounds (like this one) which are not needed any more.

because it could lead to potential crashes
@AkesiSeli AkesiSeli self-assigned this Dec 28, 2024
@AkesiSeli
Copy link
Collaborator Author

This is also a potential fix for #647 (which randomly occurred on some posts in a similar way).

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Flag Coverage Δ
unittests 58.11% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@AkesiSeli AkesiSeli merged commit 68b192e into master Dec 28, 2024
2 checks passed
@AkesiSeli AkesiSeli deleted the remove-append-line-if-needed branch December 28, 2024 21:08
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants