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

Typos #156

Merged
merged 1 commit into from Nov 8, 2022
Merged

Typos #156

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -218,7 +218,7 @@ var wildStyle = style.Copy().Blink(true)
```

`Copy()` performs a copy on the underlying data structure ensuring that you get
a true, dereferenced copy of a style. Without copying it's possible to mutate
a true, dereferenced copy of a style. Without copying, it's possible to mutate
styles.


Expand Down
2 changes: 1 addition & 1 deletion borders.go
Expand Up @@ -247,7 +247,7 @@ func (s Style) applyBorder(str string) string {
border.Right = " "
}

// If corners should be render but are set with the empty string, fill them
// If corners should be rendered but are set with the empty string, fill them
// with a single space.
if hasTop && hasLeft && border.TopLeft == "" {
border.TopLeft = " "
Expand Down
6 changes: 3 additions & 3 deletions color.go
Expand Up @@ -178,7 +178,7 @@ func (ac AdaptiveColor) RGBA() (r, g, b, a uint32) {
}

// CompleteColor specifies exact values for truecolor, ANSI256, and ANSI color
// profiles. Automatic color degredation will not be performed.
// profiles. Automatic color degradation will not be performed.
type CompleteColor struct {
TrueColor string
ANSI256 string
Expand Down Expand Up @@ -210,9 +210,9 @@ func (c CompleteColor) RGBA() (r, g, b, a uint32) {
return termenv.ConvertToRGB(c.color()).RGBA()
}

// CompleteColor specifies exact values for truecolor, ANSI256, and ANSI color
// CompleteAdaptiveColor specifies exact values for truecolor, ANSI256, and ANSI color
// profiles, with separate options for light and dark backgrounds. Automatic
// color degredation will not be performed.
// color degradation will not be performed.
type CompleteAdaptiveColor struct {
Light CompleteColor
Dark CompleteColor
Expand Down
2 changes: 1 addition & 1 deletion get.go
Expand Up @@ -200,7 +200,7 @@ func (s Style) GetVerticalMargins() int {
// GetBorder returns the style's border style (type Border) and value for the
// top, right, bottom, and left in that order. If no value is set for the
// border style, Border{} is returned. For all other unset values false is
// returend.
// returned.
func (s Style) GetBorder() (b Border, top, right, bottom, left bool) {
return s.getBorderStyle(),
s.getAsBool(borderTopKey, false),
Expand Down
4 changes: 2 additions & 2 deletions position.go
Expand Up @@ -39,7 +39,7 @@ func Place(width, height int, hPos, vPos Position, str string, opts ...Whitespac

// PlaceHorizontal places a string or text block horizontally in an unstyled
// block of a given width. If the given width is shorter than the max width of
// the string (measured by it's longest line) this will be a noöp.
// the string (measured by its longest line) this will be a noop.
Copy link
Member

Choose a reason for hiding this comment

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

Farewell my diaeresis

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@meowgorithm don't tell me it was intentional :)

Copy link
Member

Choose a reason for hiding this comment

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

@nervo Alas, as a native English speaker, this was my chance to flaunt the only diacritic we (barely) have. It was naïve of me to think spell checkers would coöperate accordingly.

:D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now i feel both sad and ashamed...
Here is a lil' duck for you, may its cuteness fill your heart

func PlaceHorizontal(width int, pos Position, str string, opts ...WhitespaceOption) string {
lines, contentWidth := getLines(str)
gap := width - contentWidth
Expand Down Expand Up @@ -89,7 +89,7 @@ func PlaceHorizontal(width int, pos Position, str string, opts ...WhitespaceOpti

// PlaceVertical places a string or text block vertically in an unstyled block
// of a given height. If the given height is shorter than the height of the
// string (measured by it's newlines) then this will be a noöp.
// string (measured by its newlines) then this will be a noop.
func PlaceVertical(height int, pos Position, str string, opts ...WhitespaceOption) string {
contentHeight := strings.Count(str, "\n") + 1
gap := height - contentHeight
Expand Down
2 changes: 1 addition & 1 deletion runes.go
Expand Up @@ -4,7 +4,7 @@ import (
"strings"
)

// StyleRunes applys a given style to runes at the given indices in the string.
// StyleRunes apply a given style to runes at the given indices in the string.
// Note that you must provide styling options for both matched and unmatched
// runes. Indices out of bounds will be ignored.
func StyleRunes(str string, indices []int, matched, unmatched Style) string {
Expand Down
14 changes: 7 additions & 7 deletions set.go
@@ -1,7 +1,7 @@
package lipgloss

// This could (should) probably just be moved into NewStyle(). We've broken it
// out so we can call it in a lazy way.
// out, so we can call it in a lazy way.
func (s *Style) init() {
if s.rules == nil {
s.rules = make(rules)
Expand All @@ -16,7 +16,7 @@ func (s *Style) set(key propKey, value interface{}) {
case int:
// We don't allow negative integers on any of our values, so just keep
// them at zero or above. We could use uints instead, but the
// conversions are a little tedious so we're sticking with ints for
// conversions are a little tedious, so we're sticking with ints for
// sake of usability.
s.rules[key] = max(0, v)
default:
Expand Down Expand Up @@ -120,13 +120,13 @@ func (s Style) Align(p ...Position) Style {
return s
}

// HorizontalAlign sets a horizontal text alignment rule.
// AlignHorizontal sets a horizontal text alignment rule.
func (s Style) AlignHorizontal(p Position) Style {
s.set(alignHorizontalKey, p)
return s
}

// VerticalAlign sets a text alignment rule.
// AlignVertical sets a text alignment rule.
func (s Style) AlignVertical(p Position) Style {
s.set(alignVerticalKey, p)
return s
Expand Down Expand Up @@ -251,7 +251,7 @@ func (s Style) MarginBackground(c TerminalColor) Style {
return s
}

// Border is shorthand for setting a the border style and which sides should
// Border is shorthand for setting the border style and which sides should
// have a border at once. The variadic argument sides works as follows:
//
// With one value, the value is applied to all sides.
Expand Down Expand Up @@ -505,15 +505,15 @@ func (s Style) MaxHeight(n int) Style {
}

// UnderlineSpaces determines whether to underline spaces between words. By
// default this is true. Spaces can also be underlined without underlining the
// default, this is true. Spaces can also be underlined without underlining the
// text itself.
func (s Style) UnderlineSpaces(v bool) Style {
s.set(underlineSpacesKey, v)
return s
}

// StrikethroughSpaces determines whether to apply strikethroughs to spaces
// between words. By default this is true. Spaces can also be struck without
// between words. By default, this is true. Spaces can also be struck without
// underlining the text itself.
func (s Style) StrikethroughSpaces(v bool) Style {
s.set(strikethroughSpacesKey, v)
Expand Down
2 changes: 1 addition & 1 deletion style.go
Expand Up @@ -77,7 +77,7 @@ type rules map[propKey]interface{}

// NewStyle returns a new, empty Style. While it's syntactic sugar for the
// Style{} primitive, it's recommended to use this function for creating styles
// incase the underlying implementation changes.
// in case the underlying implementation changes.
func NewStyle() Style {
return Style{}
}
Expand Down
2 changes: 1 addition & 1 deletion unset.go
Expand Up @@ -79,7 +79,7 @@ func (s Style) UnsetAlignHorizontal() Style {
return s
}

// UnsetAlignHorizontal removes the vertical text alignment style rule, if set.
// UnsetAlignVertical removes the vertical text alignment style rule, if set.
func (s Style) UnsetAlignVertical() Style {
delete(s.rules, alignVerticalKey)
return s
Expand Down