-
-
Notifications
You must be signed in to change notification settings - Fork 47
fix: strikethrough doesn't render with underline #300
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
base: develop
Are you sure you want to change the base?
fix: strikethrough doesn't render with underline #300
Conversation
Thank you very much for the PR, I'll have to look more into it. What worries me a bit is that we specifically have to look out for strikethrough in that case, and are not depending on the general annotated string builder which would handle more than just strikethrough. |
Thank you for the feedback, I understand the concern about handling only strikethrough and not relying on the general AnnotatedString Builder. I'll look into finding a solution to ensure we handle multiple text styles (like italic, bold, and strikethrough) in a more integrated way. I'll keep you updated on my progress. |
Strictly speaking all the spans should already be applied at that point 🤔 I suppose the way compose handles links inside an annotated string overrides all the other spans that apply to this section already. I also just realized that my example was the inverse :D where the style was within the link and not from the outside. Generally we might need to do something like this: where we get the spans for the range of the string and apply the similar "special" text stylings like underline, bold, italic, strikethrough, ... |
withLink(LinkAnnotation.Url(annotation, annotatorSettings.linkTextSpanStyle, annotatorSettings.linkInteractionListener)) { | ||
text?.let { annotatorSettings.referenceLinkHandler?.store(it, annotation) } | ||
|
||
val linkStyle = if (node.parent?.type == GFMElementTypes.STRIKETHROUGH) { |
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.
as we are in that stage still using a |
Fix: Strikethrough Links Not Rendering Properly
This PR fixes the issue where strikethrough links (e.g.,
~[This is a link](https://example.com)~
) were not displaying the strikethrough effect. Now, both the link styling and strikethrough are correctly applied.Closes #299