Add periods to comments to make the linter happy

This commit is contained in:
Christian Rocha 2020-08-24 16:07:43 -04:00 committed by Christian Muehlhaeuser
parent 2fdef64478
commit c0daa74358
2 changed files with 10 additions and 10 deletions

View file

@ -45,7 +45,7 @@ var (
statusBarBg = common.NewColorPair("#242424", "#E6E6E6")
statusBarNoteFg = common.NewColorPair("#7D7D7D", "#656565")
// Styling functions
// Styling functions.
statusBarScrollPosStyle = newStyle(common.NewColorPair("#5A5A5A", "#949494").String(), statusBarBg.String())
statusBarNoteStyle = newStyle(statusBarNoteFg.String(), statusBarBg.String())
statusBarHelpStyle = newStyle(statusBarNoteFg.String(), common.NewColorPair("#323232", "#DCDCDC").String())
@ -59,7 +59,7 @@ var (
helpViewStyle = newStyle(statusBarNoteFg.String(), common.NewColorPair("#1B1B1B", "#f2f2f2").String())
)
// Create a new termenv styling function
// Create a new termenv styling function.
func newStyle(fg, bg string) func(string) string {
return te.Style{}.
Foreground(te.ColorProfile().Color(fg)).
@ -546,7 +546,7 @@ func stashDocument(cc *charm.Client, md markdown) tea.Cmd {
}
}
// This is where the magic happens
// This is where the magic happens.
func glamourRender(m pagerModel, markdown string) (string, error) {
if !config.GlamourEnabled {

View file

@ -58,7 +58,7 @@ const (
// and news.
type markdown struct {
markdownType markdownType
localPath string // only relevent to local files and converted files that are newly stashed
localPath string // only relevant to local files and converted files that are newly stashed
charm.Markdown
}
@ -66,7 +66,7 @@ func (m markdown) sortAsLocal() bool {
return m.markdownType == localMarkdown || m.markdownType == convertedMarkdown
}
// Sort documents with local files first, then by date
// Sort documents with local files first, then by date.
type markdownsByLocalFirst []*markdown
func (m markdownsByLocalFirst) Len() int { return len(m) }
@ -173,12 +173,12 @@ func (m *stashModel) setSize(width, height int) {
}
}
// markdownIndex returns the index of the currently selected markdown item.
// MarkdownIndex returns the index of the currently selected markdown item.
func (m stashModel) markdownIndex() int {
return m.paginator.Page*m.paginator.PerPage + m.index
}
// return the current selected markdown in the stash
// Return the current selected markdown in the stash.
func (m stashModel) selectedMarkdown() *markdown {
i := m.markdownIndex()
if i < 0 || len(m.markdowns) == 0 || len(m.markdowns) <= i {
@ -187,7 +187,7 @@ func (m stashModel) selectedMarkdown() *markdown {
return m.markdowns[i]
}
// adds markdown documents to the model
// Adds markdown documents to the model.
func (m *stashModel) addMarkdowns(mds ...*markdown) {
if len(mds) > 0 {
m.markdowns = append(m.markdowns, mds...)
@ -196,7 +196,7 @@ func (m *stashModel) addMarkdowns(mds ...*markdown) {
}
}
// find a local markdown by its path and remove it
// Find a local markdown by its path and remove it.
func (m *stashModel) removeLocalMarkdown(localPath string) error {
i := -1
@ -224,7 +224,7 @@ func (m *stashModel) removeLocalMarkdown(localPath string) error {
return nil
}
// return the number of markdown documents of a given type
// Return the number of markdown documents of a given type.
func (m stashModel) countMarkdowns(t markdownType) (found int) {
if len(m.markdowns) == 0 {
return