diff options
Diffstat (limited to 'polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts')
-rw-r--r-- | polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts index e2229b5ce7..6ca47022c1 100644 --- a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts +++ b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts @@ -889,7 +889,10 @@ export class GrComment extends LitElement { }); const replacement = suggestion.suggestions?.[0].replacement; if (!replacement) return; - this.messageText += `${USER_SUGGESTION_START_PATTERN}${suggestion}${'\n```'}`; + const addNewLine = this.messageText.length !== 0; + this.messageText += `${ + addNewLine ? '\n' : '' + }${'```\n'}${replacement}${'\n```'}`; } private renderRobotActions() { |