mirror of
https://github.com/charmbracelet/glow
synced 2024-12-13 13:42:34 +00: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…
Reference in a new issue