This commit is contained in:
gustavosbarreto 2026-08-05 16:12:58 +08:00 committed by GitHub
commit dea8025488
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -12,6 +12,7 @@ import (
"github.com/charmbracelet/bubbles/spinner"
"github.com/charmbracelet/bubbles/textinput"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/glow/v2/utils"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/log"
"github.com/muesli/reflow/ansi"
@ -860,7 +861,7 @@ func loadLocalMarkdown(md *markdown) tea.Cmd {
log.Debug("error reading local file", "error", err)
return errMsg{err}
}
md.Body = string(data)
md.Body = string(utils.RemoveFrontmatter(data))
return fetchedMarkdownMsg(md)
}
}

View file

@ -175,6 +175,7 @@ func newModel(cfg Config, content string) tea.Model {
m.state = stateShowDocument
m.pager.currentDocument = markdown{
localPath: path,
Body: content,
Note: stripAbsolutePath(path, cwd),
Modtime: info.ModTime(),
}