Skip to content

Commit

Permalink
chore(discord): language in code block
Browse files Browse the repository at this point in the history
  • Loading branch information
yhx-12243 committed Jun 4, 2024
1 parent 5515c3f commit c9341a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adapters/discord/src/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ export class DiscordMessageEncoder<C extends Context = Context> extends MessageE
this.buffer += sanitizeCode(children.toString())
this.buffer += '``'
} else if (type === 'codeblock') {
this.buffer += '```'
this.buffer += `\`\`\`${attrs.language ?? ''}\n`
this.buffer += sanitizeCode(children.toString())
this.buffer += '```'
this.buffer += '\n```'
} else if (type === 'a') {
this.buffer += '['
await this.render(children)
Expand Down

0 comments on commit c9341a0

Please sign in to comment.