Skip to content
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

Add config to disable link underline #105

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

Conversation

ben-gooding-sky
Copy link

@ben-gooding-sky ben-gooding-sky commented Jul 9, 2024

Happy for feedback on the implementation

linkColor is duplicated, but should be backwards compatible

Examples

Screenshot 2024-07-09 at 09 39 38 Screenshot 2024-07-09 at 09 40 07

@ben-gooding-sky ben-gooding-sky changed the title Disable link underline Add config to disable link underline Jul 9, 2024
@@ -83,7 +83,8 @@ fun MarkdownText(
fun MarkdownText(
markdown: String,
modifier: Modifier = Modifier,
linkColor: Color = Color.Unspecified,
linkStyle: LinkStyle = LinkStyle.Default,
Copy link
Owner

@jeziellago jeziellago Jul 12, 2024

Choose a reason for hiding this comment

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

Could you take the advantage of having the new LinkStyle and use the color from there, using the linkColor as fallback, to avoid inconsistence and keeping backward compatibility?
Something like:

val currentLinkColor = if (linkStyle.color != Color.Unspecified) {
    linkStyle.color
} else {
    linkColor
}

@jeziellago
Copy link
Owner

Could you also add examples for links with/without underline in the project sample?

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.

2 participants