This commit is contained in:
Dhanush Shetty 2026-08-07 06:11:41 +08:00 committed by GitHub
commit 754e131f6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -190,13 +190,7 @@ func (m model) Init() tea.Cmd {
case stateShowStash:
cmds = append(cmds, findLocalFiles(*m.common))
case stateShowDocument:
content, err := os.ReadFile(m.common.cfg.Path)
if err != nil {
log.Error("unable to read file", "file", m.common.cfg.Path, "error", err)
return func() tea.Msg { return errMsg{err} }
}
body := string(utils.RemoveFrontmatter(content))
cmds = append(cmds, renderWithGlamour(m.pager, body))
cmds = append(cmds, loadLocalMarkdown(&m.pager.currentDocument))
}
return tea.Batch(cmds...)