Skip to content

Fix slash commands detection in comments

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

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?

EE port for this MR is available here https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1876

What are the relevant issue numbers?

Closes #32016 (closed)

Merge request reports