Skip to content

Commit

Permalink
docs: minor fixes to comments
Browse files Browse the repository at this point in the history
  • Loading branch information
winder authored and maaslalani committed Oct 15, 2022
1 parent 92c8fa0 commit 3dd9f0b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
20 changes: 10 additions & 10 deletions get.go
Expand Up @@ -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)
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
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 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 {
Expand Down
4 changes: 2 additions & 2 deletions set.go
Expand Up @@ -39,15 +39,15 @@ 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
}

// 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
Expand Down
2 changes: 1 addition & 1 deletion style.go
Expand Up @@ -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
Expand Down

0 comments on commit 3dd9f0b

Please sign in to comment.