mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-09 09:49:09 +02:00
Add a prefix according to the markdownType when filtering notes
This commit is contained in:
parent
faeef13e55
commit
fbe93a90ff
1 changed files with 9 additions and 1 deletions
10
ui/stash.go
10
ui/stash.go
|
|
@ -229,7 +229,15 @@ func (m *stashModel) getNotes() []*markdown {
|
|||
targets := []string{}
|
||||
|
||||
for _, t := range m.markdowns {
|
||||
targets = append(targets, t.Note)
|
||||
prefix := ""
|
||||
switch t.markdownType {
|
||||
case newsMarkdown:
|
||||
prefix = "News: "
|
||||
case convertedMarkdown:
|
||||
prefix = t.localPath
|
||||
}
|
||||
|
||||
targets = append(targets, prefix+t.Note)
|
||||
}
|
||||
|
||||
ranks := fuzzy.RankFindFold(m.searchInput.Value(), targets)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue