summaryrefslogtreecommitdiff
path: root/lib/gitlab/markdown/label_reference_filter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/markdown/label_reference_filter.rb')
-rw-r--r--lib/gitlab/markdown/label_reference_filter.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/markdown/label_reference_filter.rb b/lib/gitlab/markdown/label_reference_filter.rb
index a357f28458d..1a77becee89 100644
--- a/lib/gitlab/markdown/label_reference_filter.rb
+++ b/lib/gitlab/markdown/label_reference_filter.rb
@@ -84,11 +84,11 @@ module Gitlab
#
# Returns a Hash.
def label_params(id, name)
- if id > 0
- { id: id }
- else
+ if name
# TODO (rspeicher): Don't strip single quotes if we decide to only use double quotes for surrounding.
{ name: name.tr('\'"', '') }
+ else
+ { id: id }
end
end
end