The suggested changes block should use another markup instead of 3 backticks
Summary
In case a multi-line suggestion includes a codeblock, the markdown renderer won't render it correctly.
Since the suggestion is an extension to our Markdown pipeline, we should be able to also include raw Markdown. We've been hit by this in the past, so this is now in the docs styleguide https://docs.gitlab.com/ee/development/documentation/styleguide.html#code-blocks.
Steps to reproduce
- Go to an MR that includes a diff that changes a doc and includes a codeblock.
- Use the multi-suggestion feature that includes changing the Markdown.
You'll end up having:
```suggestion: -0+0
```sh
./run.sh
```
```
This means we'll have 4 consecutive 3-backticks. We need to escape the inner ones.
Example project axil/playground!13 (diffs).
| Raw suggestion | Wrong preview | Correct preview |
|---|---|---|
![]() |
![]() |
![]() |
What is the current bug behavior?
The suggestion block doesn't render correctly.
What is the expected correct behavior?
The suggestion block should render correctly when it contains raw markdown.
Possible fixes
The suggestion markdown snippet should begin and end with four backticks or use tildes instead of backticks.
Edited by Achilleas Pipinellis


