Skip to content

Fix slash commands detection in comments

kushalpandya requested to merge ee-32016-slash-command-strip-fix into master

This MR is an EE port for https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11265

What does this MR do?

Fixes how slash commands are identified in comment content (slash commands are always present in the beginning of line).

Why was this MR needed?

Due to a bug in how slash commands are identified, introduced with feature https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10760, any comment that has / somewhere in middle is stripped incorrectly, this MR fixes the way slash commands are detected so that comment string is not stripped incorrectly.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/32016

Merge request reports