diff --git a/get.go b/get.go index f01b8f15..2613750f 100644 --- a/get.go +++ b/get.go @@ -6,42 +6,42 @@ import ( "github.com/muesli/reflow/ansi" ) -// GetBold returns the style's bold value It no value is set false is returned. +// GetBold returns the style's bold value. If no value is set false is returned. func (s Style) GetBold() bool { return s.getAsBool(boldKey, false) } -// GetItalic returns the style's italic value. It no value is set false is +// GetItalic returns the style's italic value. If no value is set false is // returned. func (s Style) GetItalic() bool { return s.getAsBool(italicKey, false) } -// GetUnderline returns the style's underline value. It no value is set false is +// GetUnderline returns the style's underline value. If no value is set false is // returned. func (s Style) GetUnderline() bool { return s.getAsBool(underlineKey, false) } -// GetStrikethrough returns the style's strikethrough value. It no value is set false +// GetStrikethrough returns the style's strikethrough value. If no value is set false // is returned. func (s Style) GetStrikethrough() bool { return s.getAsBool(strikethroughKey, false) } -// GetReverse returns the style's reverse value. It no value is set false is +// GetReverse returns the style's reverse value. If no value is set false is // returned. func (s Style) GetReverse() bool { return s.getAsBool(reverseKey, false) } -// GetBlink returns the style's blink value. It no value is set false is +// GetBlink returns the style's blink value. If no value is set false is // returned. func (s Style) GetBlink() bool { return s.getAsBool(blinkKey, false) } -// GetFaint returns the style's faint value. It no value is set false is +// GetFaint returns the style's faint value. If no value is set false is // returned. func (s Style) GetFaint() bool { return s.getAsBool(faintKey, false) @@ -72,7 +72,7 @@ func (s Style) GetHeight() int { } // GetAlign returns the style's implicit horizontal alignment setting. -// If no alignment is set Position.AlignLeft is returned. +// If no alignment is set Position.Left is returned. func (s Style) GetAlign() Position { v := s.getAsPosition(alignHorizontalKey) if v == Position(0) { @@ -82,7 +82,7 @@ func (s Style) GetAlign() Position { } // GetAlignHorizontal returns the style's implicit horizontal alignment setting. -// If no alignment is set Position.AlignLeft is returned. +// If no alignment is set Position.Left is returned. func (s Style) GetAlignHorizontal() Position { v := s.getAsPosition(alignHorizontalKey) if v == Position(0) { @@ -92,7 +92,7 @@ func (s Style) GetAlignHorizontal() Position { } // GetAlignVertical returns the style's implicit vertical alignment setting. -// If no alignment is set Position.AlignTop is returned. +// If no alignment is set Position.Top is returned. func (s Style) GetAlignVertical() Position { v := s.getAsPosition(alignVerticalKey) if v == Position(0) { diff --git a/runes.go b/runes.go index 723f6dbf..2c5265a3 100644 --- a/runes.go +++ b/runes.go @@ -4,7 +4,7 @@ import ( "strings" ) -// StyleRunes applys a given style to runes at the given indicesin the string. +// StyleRunes applys 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 { diff --git a/set.go b/set.go index 02884543..4fa9c3b8 100644 --- a/set.go +++ b/set.go @@ -39,7 +39,7 @@ func (s Style) Italic(v bool) Style { // Underline sets an underline rule. By default, underlines will not be drawn on // whitespace like margins and padding. To change this behavior set -// renderUnderlinesOnSpaces. +// UnderlineSpaces. func (s Style) Underline(v bool) Style { s.set(underlineKey, v) return s @@ -47,7 +47,7 @@ func (s Style) Underline(v bool) Style { // Strikethrough sets a strikethrough rule. By default, strikes will not be // drawn on whitespace like margins and padding. To change this behavior set -// renderStrikethroughOnSpaces. +// StrikethroughSpaces. func (s Style) Strikethrough(v bool) Style { s.set(strikethroughKey, v) return s diff --git a/style.go b/style.go index fb89d06c..4c149326 100644 --- a/style.go +++ b/style.go @@ -432,7 +432,7 @@ func padLeft(str string, n int, style *termenv.Style) string { return b.String() } -// Apply right right padding. +// Apply right padding. func padRight(str string, n int, style *termenv.Style) string { if n == 0 || str == "" { return str