config: rename markdown_enabled to markdown

This commit is contained in:
ayn2op 2025-06-02 00:12:05 -04:00
parent e976dc6537
commit 8bdb26ec3a
3 changed files with 4 additions and 4 deletions

View file

@ -162,7 +162,7 @@ func (mt *messagesText) drawAuthor(msg discord.Message) {
func (mt *messagesText) drawContent(msg discord.Message) {
c := []byte(tview.Escape(msg.Content))
ast := discordmd.ParseWithMessage(c, *discordState.Cabinet, &msg, false)
if app.cfg.MarkdownEnabled {
if app.cfg.Markdown {
markdown.DefaultRenderer.Render(mt, c, ast)
} else {
mt.Write(c) // write the content as is

View file

@ -41,12 +41,11 @@ type (
Mouse bool `toml:"mouse"`
Editor string `toml:"editor"`
Markdown bool `toml:"markdown"`
HideBlockedUsers bool `toml:"hide_blocked_users"`
ShowAttachmentLinks bool `toml:"show_attachment_links"`
MessagesLimit uint8 `toml:"messages_limit"`
MarkdownEnabled bool `toml:"markdown_enabled"`
Timestamps Timestamps `toml:"timestamps"`
Identify Identify `toml:"identify"`
Notifications Notifications `toml:"notifications"`

View file

@ -7,7 +7,8 @@ editor = "default"
hide_blocked_users = true
show_attachment_links = true
messages_limit = 50
markdown_enabled = true
# Whether to parse and render markdown in messages or not.
markdown = true
# Timestamps uses Go timestamp format
# See: https://gosamples.dev/date-time-format-cheatsheet