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 hyperlink formatter #263

Merged
merged 1 commit into from Jul 19, 2023
Merged

add hyperlink formatter #263

merged 1 commit into from Jul 19, 2023

Conversation

sanyatuning
Copy link
Contributor

Proposed Changes

  • add hyperlink formatter

@coveralls
Copy link

Pull Request Test Coverage Report for Build 4973056443

  • 8 of 8 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 4287264671: 0.0%
Covered Lines: 3296
Relevant Lines: 3296

💛 - Coveralls

@sonarcloud
Copy link

sonarcloud bot commented May 14, 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

Comment on lines +9 to +11
if text == "" {
return url
}
Copy link
Owner

@jedib0t jedib0t May 23, 2023

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"))
}
Copy link
Owner

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.

@jedib0t
Copy link
Owner

jedib0t commented May 27, 2023

@sanyatuning I'm not sure if you got notifications of my comments above. Pinging again just in case.

@jedib0t jedib0t merged commit 62b2484 into jedib0t:main Jul 19, 2023
4 checks passed
@jedib0t
Copy link
Owner

jedib0t commented Jul 19, 2023

Due to lack of response, I've merged the PR. Will work on the comments listed above myself.

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.

None yet

3 participants