Skip to content

Commit

Permalink
fix(mail): fix br rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Seidko authored Sep 1, 2023
1 parent d366e86 commit 0cfb401
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion adapters/mail/src/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export class MailMessageEncoder extends MessageEncoder<MailBot> {
const { type, attrs, children } = element
if (type === 'text') {
this.buffer += attrs.content
} else if (['b', 'strong', 'i', 'em', 'u', 'ins', 's', 'del', 'p', 'code', 'li', 'ul', 'ol', 'blockquote', 'br'].includes(type)) {
} else if (type === 'br') {
this.buffer += '<br>'
} else if (['b', 'strong', 'i', 'em', 'u', 'ins', 's', 'del', 'p', 'code', 'li', 'ul', 'ol', 'blockquote'].includes(type)) {
this.buffer += `<${type}>`
await this.render(children)
this.buffer += `</${type}>`
Expand Down

0 comments on commit 0cfb401

Please sign in to comment.