Skip to content

Commit

Permalink
msgconv/matrixfmt: fix newlines in plaintext messages (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
redgoat650 committed Sep 30, 2024
1 parent 9976ed2 commit aa5b58c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/msgconv/matrixfmt/blocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,10 +451,11 @@ func (parser *HTMLParser) nodeToBlock(node *html.Node, ctx Context) *slack.RichT

func (parser *HTMLParser) ParseText(ctx context.Context, text string, mentions *event.Mentions, portal *bridgev2.Portal) *slack.RichTextBlock {
formatCtx := Context{
Ctx: ctx,
TagStack: make(format.TagStack, 0),
Portal: portal,
Mentions: mentions,
Ctx: ctx,
TagStack: make(format.TagStack, 0),
Portal: portal,
Mentions: mentions,
PreserveWhitespace: true,
}
elems := parser.textToElements(text, formatCtx)
return slack.NewRichTextBlock("", slack.NewRichTextSection(elems...))
Expand Down

0 comments on commit aa5b58c

Please sign in to comment.