Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
5a002723
Commit
5a002723
authored
Feb 17, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow slashes in slash command arguments
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
b08be165
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
changelogs/unreleased/28329-allow-slash-in-slash-command-args.yml
...gs/unreleased/28329-allow-slash-in-slash-command-args.yml
+4
-0
lib/gitlab/slash_commands/extractor.rb
lib/gitlab/slash_commands/extractor.rb
+1
-1
spec/lib/gitlab/slash_commands/extractor_spec.rb
spec/lib/gitlab/slash_commands/extractor_spec.rb
+8
-0
No files found.
changelogs/unreleased/28329-allow-slash-in-slash-command-args.yml
0 → 100644
View file @
5a002723
---
title
:
Allow slashes in slash command arguments
merge_request
:
author
:
lib/gitlab/slash_commands/extractor.rb
View file @
5a002723
...
...
@@ -103,7 +103,7 @@ module Gitlab
(?<cmd>
#{
Regexp
.
union
(
names
)
}
)
(?:
[ ]
(?<arg>[^
\
/\
n
]*)
(?<arg>[^
\n
]*)
)?
(?:
\n
|$)
)
...
...
spec/lib/gitlab/slash_commands/extractor_spec.rb
View file @
5a002723
...
...
@@ -81,6 +81,14 @@ describe Gitlab::SlashCommands::Extractor do
let
(
:original_msg
)
{
"/assign @joe
\n
world"
}
let
(
:final_msg
)
{
"world"
}
end
it
'allows slash in command arguments'
do
msg
=
"/assign @joe / @jane
\n
world"
msg
,
commands
=
extractor
.
extract_commands
(
msg
)
expect
(
commands
).
to
eq
[[
'assign'
,
'@joe / @jane'
]]
expect
(
msg
).
to
eq
'world'
end
end
context
'in the middle of content'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment