fix(table): Mind borders when computing table width#575
Closed
AdrienHorgnies wants to merge 1 commit intocharmbracelet:masterfrom
Closed
fix(table): Mind borders when computing table width#575AdrienHorgnies wants to merge 1 commit intocharmbracelet:masterfrom
AdrienHorgnies wants to merge 1 commit intocharmbracelet:masterfrom
Conversation
Member
Author
|
Hi @meowgorithm. Thanks for looking at my PR. I was waiting for some feedback before looking into tests. I think you classified it as a duplicate too fast. Likewise, I ran my test script (the one from the issue) using the code from the PR#567, and I reproduced the issue; meaning the PR 567 doesn't fix this issue. I think both PRs fix separate issues, as my PR is about borders added by the table component and not by the cell's content. |
Author
|
I added a test. Here's the test result without the fix: --- FAIL: TestTableWidthEqualsContentLen (0.00s)
table_test.go:168: output does not match, expected:
┌────────┐
│0123456…│
└────────┘
got:
┌─────────
│012345678
└─────────
diff:
--- golden
+++ run
@@ -1,3 +1,3 @@
-┌────────┐
+┌─────────
-│0123456…│
+│012345678
-└────────┘
\ No newline at end of file
+└─────────
\ No newline at end of file
FAIL
FAIL github.com/charmbracelet/lipgloss/table 0.024s
FAILAnd it passes with the fix. |
Author
How so? I didn't find the option. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #574
Please check the associated issue to understand what I'm fixing.
CONTRIBUTING.md.