diff --git a/list/list.go b/list/list.go index dc38e3bc..cf3ebf45 100644 --- a/list/list.go +++ b/list/list.go @@ -1,6 +1,6 @@ // Package list allows you to build lists, as simple or complicated as you need. // -// Simply, define a list with some items and set it's rendering properties, like +// Simply, define a list with some items and set its rendering properties, like // enumerator and styling: // // groceries := list.New( diff --git a/table/table.go b/table/table.go index ad17fcfb..75836184 100644 --- a/table/table.go +++ b/table/table.go @@ -96,13 +96,13 @@ func (t *Table) ClearRows() *Table { return t } -// StyleFunc sets the style for a cell based on it's position (row, column). +// StyleFunc sets the style for a cell based on its position (row, column). func (t *Table) StyleFunc(style StyleFunc) *Table { t.styleFunc = style return t } -// style returns the style for a cell based on it's position (row, column). +// style returns the style for a cell based on its position (row, column). func (t *Table) style(row, col int) lipgloss.Style { if t.styleFunc == nil { return lipgloss.NewStyle() @@ -293,7 +293,7 @@ func (t *Table) String() string { Render(sb.String()) } -// computeHeight computes the height of the table in it's current configuration. +// computeHeight computes the height of the table in its current configuration. func (t *Table) computeHeight() int { hasHeaders := len(t.headers) > 0 return sum(t.heights) - 1 + btoi(hasHeaders) + @@ -306,7 +306,7 @@ func (t *Table) Render() string { return t.String() } -// constructTopBorder constructs the top border for the table given it's current +// constructTopBorder constructs the top border for the table given its current // border configuration and data. func (t *Table) constructTopBorder() string { var s strings.Builder @@ -325,7 +325,7 @@ func (t *Table) constructTopBorder() string { return s.String() } -// constructBottomBorder constructs the bottom border for the table given it's current +// constructBottomBorder constructs the bottom border for the table given its current // border configuration and data. func (t *Table) constructBottomBorder() string { var s strings.Builder @@ -344,7 +344,7 @@ func (t *Table) constructBottomBorder() string { return s.String() } -// constructHeaders constructs the headers for the table given it's current +// constructHeaders constructs the headers for the table given its current // header configuration and data. func (t *Table) constructHeaders() string { height := t.heights[HeaderRow+1] diff --git a/table/table_test.go b/table/table_test.go index 3957c5d1..e8957302 100644 --- a/table/table_test.go +++ b/table/table_test.go @@ -374,7 +374,7 @@ func TestTableHeights(t *testing.T) { rows := [][]string{ {"Chutar o balde", `Literally translates to "kick the bucket." It's used when someone gives up or loses patience.`}, {"Engolir sapos", `Literally means "to swallow frogs." It's used to describe someone who has to tolerate or endure unpleasant situations.`}, - {"Arroz de festa", `Literally means "party rice." It´s used to refer to someone who shows up everywhere.`}, + {"Arroz de festa", `Literally means "party rice." It's used to refer to someone who shows up everywhere.`}, } table := New(). @@ -404,7 +404,7 @@ func TestTableMultiLineRowSeparator(t *testing.T) { BorderRow(true). Row("Chutar o balde", `Literally translates to "kick the bucket." It's used when someone gives up or loses patience.`). Row("Engolir sapos", `Literally means "to swallow frogs." It's used to describe someone who has to tolerate or endure unpleasant situations.`). - Row("Arroz de festa", `Literally means "party rice." It´s used to refer to someone who shows up everywhere.`) + Row("Arroz de festa", `Literally means "party rice." It's used to refer to someone who shows up everywhere.`) golden.RequireEqual(t, []byte(table.String())) } diff --git a/table/testdata/TestTableHeights.golden b/table/testdata/TestTableHeights.golden index 5d13f3d2..0af98ed3 100644 --- a/table/testdata/TestTableHeights.golden +++ b/table/testdata/TestTableHeights.golden @@ -19,7 +19,7 @@ │ │ │ │ │ │ │ Arroz de festa │ Literally means │ -│ │ "party rice." It´s │ +│ │ "party rice." It's │ │ │ used to refer to │ │ │ someone who shows up │ │ │ everywhere. │ diff --git a/table/testdata/TestTableMultiLineRowSeparator.golden b/table/testdata/TestTableMultiLineRowSeparator.golden index 788f7c92..d6f5ce91 100644 --- a/table/testdata/TestTableMultiLineRowSeparator.golden +++ b/table/testdata/TestTableMultiLineRowSeparator.golden @@ -21,7 +21,7 @@ ├──────────────────┼─────────────────────────┤ │ │ │ │ Arroz de festa │ Literally means │ -│ │ "party rice." It´s │ +│ │ "party rice." It's │ │ │ used to refer to │ │ │ someone who shows up │ │ │ everywhere. │ diff --git a/tree/renderer.go b/tree/renderer.go index d6d4593f..2dba9cc5 100644 --- a/tree/renderer.go +++ b/tree/renderer.go @@ -49,7 +49,7 @@ func (r *renderer) render(node Node, root bool, prefix string) string { enumerator := r.enumerator indenter := r.indenter - // print the root node name if its not empty. + // print the root node name if it's not empty. if name := node.Value(); name != "" && root { strs = append(strs, r.style.root.Render(name)) } @@ -57,7 +57,7 @@ func (r *renderer) render(node Node, root bool, prefix string) string { for i := 0; i < children.Length(); i++ { if i < children.Length()-1 { if child := children.At(i + 1); child.Hidden() { - // Don't count the last child if its hidden. This renders the + // Don't count the last child if it's hidden. This renders the // last visible element with the right prefix // // The only type of Children is NodeChildren. diff --git a/tree/tree.go b/tree/tree.go index 3992971c..166e97c4 100644 --- a/tree/tree.go +++ b/tree/tree.go @@ -154,7 +154,7 @@ func (t *Tree) String() string { // Child adds a child to this Tree. // -// If a Child Tree is passed without a root, it will be parented to it's sibling +// If a Child Tree is passed without a root, it will be parented to its sibling // child (auto-nesting). // // tree.Root("Foo").Child("Bar", tree.New().Child("Baz"), "Qux")