Codeblocks break MR suggestions
Summary
When adding a suggestion on an MR that includes a code block, the suggestion exits early and breaks.
for example, adding a suggestion like so breaks the suggestion UI:
```suggestion:-9+0
### CSS utility classes
The simplest way to use these utilities is to add classes to the desired element.
```html
<span class="gl-text-subtle gl-truncate">This text will be a subtle gray color, truncated to fit its container.</span>
\`\`\`
This is recommended for most cases, but can clutter the codebase if overused. If you find yourself adding too many of these classes and want a cleaner approach, you can use `@apply` instead.
\`\`\`
Note: This also breaks in the issue description so I've escaped the backticks with `\``. Which also breaks. Backticks are hard
It's probably better to see the issue in this video
Steps to reproduce
- Open an MR
- Add a suggestion that includes a code block
- Save that suggestion
Example Project
What is the current bug behavior?
The suggestion breaks out early and misses everything after the closing code block.
What is the expected correct behavior?
The code block is encapsulated in the suggestion.
Output of checks
This bug happens on GitLab.com
Possible fixes
Replace the default behavior of the button to add three ~ instead. The functionality is the same but it won't error out on the closing code block tag.
Edited by Sam Beckham