-
Notifications
You must be signed in to change notification settings - Fork 122
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 hyperlink formatter #263
Conversation
Pull Request Test Coverage Report for Build 4973056443
💛 - Coveralls |
Kudos, SonarCloud Quality Gate passed! |
if text == "" { | ||
return url | ||
} |
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.
It may be better to default the text
to url
if no text was provided?
Also, rename text
to alias
?
assert.Equal(t, "Ghost", Hyperlink("", "Ghost")) | ||
assert.Equal(t, "https://example.com", Hyperlink("https://example.com", "")) | ||
assert.Equal(t, "\x1b]8;;https://example.com\x1b\\Ghost\x1b]8;;\x1b\\", Hyperlink("https://example.com", "Ghost")) | ||
} |
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.
Can you add an Example function for godoc? You can take a look at some of the other test files in this package to see what I'm talking about.
@sanyatuning I'm not sure if you got notifications of my comments above. Pinging again just in case. |
Due to lack of response, I've merged the PR. Will work on the comments listed above myself. |
Proposed Changes