Skip to content

Commit

Permalink
Modify pager to always display item link and to display item descript…
Browse files Browse the repository at this point in the history
…ion if item content is empty (guyfedwards#59)

Co-authored-by: Baylen Romanello <[email protected]>
Co-authored-by: Guy Edwards <[email protected]>
  • Loading branch information
3 people authored Apr 18, 2024
1 parent baf48ed commit 888841e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions internal/commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,8 @@ func glamouriseItem(item store.Item) (string, error) {
mdown += item.PublishedAt.String()
}
mdown += "\n\n"
mdown += item.Link
mdown += "\n\n"
mdown += htmlToMd(item.Content)

out, err := glamour.Render(mdown, "dark")
Expand Down
2 changes: 1 addition & 1 deletion internal/rss/rss.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func feedToRSS(f config.Feed, feed *gofeed.Feed) RSS {
if it.Content == "" {
// If there's no content (as is the case for YouTube RSS items), fallback
// to the link.
ni.Content = it.Link
ni.Content = it.Description
} else {
ni.Content = it.Content
}
Expand Down

0 comments on commit 888841e

Please sign in to comment.