Fix bug that caused Suggestion Markdown toolbar button to insert snippet with leading +/-/<space>
What does this MR do?
Trim first char of diff line text on diff discussions.
Before, diff file higlighted_diff_lines
/parallel_diff_lines
and
diff discussion truncated_diff_lines
were inconsistent: text
and
rich_text
on the latter included the leading +/-/<space>
character,
like on the backend, while the former had no text
and its rich_text
had dropped this char.
This resulted in a bug when the suggestions feature expected these diff
line objects to be identical in format and thus interchangeable, which
was not the case: when the Suggestion button was used in the Markdown
toolbar of a reply to an existing diff discussion, rather than a new
discussion on the Changes tab, the inserted Suggestion code snippet
would include the leading +/-/<space>
character.
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides