diff --git a/changelog.d/937.bugfix b/changelog.d/937.bugfix new file mode 100644 index 00000000..617273e8 --- /dev/null +++ b/changelog.d/937.bugfix @@ -0,0 +1 @@ +Fix rendering of comments of GitLab merge requests. \ No newline at end of file diff --git a/src/Connections/GitlabRepo.ts b/src/Connections/GitlabRepo.ts index d4d7fad1..05e3eb9b 100644 --- a/src/Connections/GitlabRepo.ts +++ b/src/Connections/GitlabRepo.ts @@ -785,14 +785,18 @@ ${data.description}`; const target = relation ? '' : ` MR [${orgRepoName}!${mergeRequest.iid}](${mergeRequest.url}): "${mergeRequest.title}"`; let content = `**${result.author}** ${action}${target} ${comments}`; + let formatted = ''; if (result.commentNotes) { content += "\n\n> " + result.commentNotes.join("\n\n> "); + formatted = md.render(content); + } else { + formatted = md.renderInline(content); } const eventPromise = this.intent.sendEvent(this.roomId, { msgtype: "m.notice", body: content, - formatted_body: md.renderInline(content), + formatted_body: formatted, format: "org.matrix.custom.html", ...relation, }).catch(ex => {