diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-01-19 19:08:11 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-01-19 19:08:11 +0300 |
commit | 2b37e4c1995284a4871d6d7077b0884e95c2496e (patch) | |
tree | 615e0a3c063ac7e93001434a4a0932cb061e8cc9 /lib/banzai/filter | |
parent | f928e19cb572b34d93baaa5e3040d99fc5ba9939 (diff) | |
parent | 52762df285751dec4e54c4c55be5bbecb3bd4fc9 (diff) |
Merge branch 'master' into copy-as-md
# Conflicts:
# app/assets/javascripts/lib/utils/common_utils.js.es6
Diffstat (limited to 'lib/banzai/filter')
-rw-r--r-- | lib/banzai/filter/reference_filter.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/banzai/filter/reference_filter.rb b/lib/banzai/filter/reference_filter.rb index 84bfeac8041..ab7af1cad21 100644 --- a/lib/banzai/filter/reference_filter.rb +++ b/lib/banzai/filter/reference_filter.rb @@ -20,10 +20,10 @@ module Banzai # Examples: # # data_attribute(project: 1, issue: 2) - # # => "data-reference-filter=\"SomeReferenceFilter\" data-project=\"1\" data-issue=\"2\"" + # # => "data-reference-type=\"SomeReferenceFilter\" data-project=\"1\" data-issue=\"2\"" # # data_attribute(project: 3, merge_request: 4) - # # => "data-reference-filter=\"SomeReferenceFilter\" data-project=\"3\" data-merge-request=\"4\"" + # # => "data-reference-type=\"SomeReferenceFilter\" data-project=\"3\" data-merge-request=\"4\"" # # Returns a String def data_attribute(attributes = {}) @@ -31,7 +31,9 @@ module Banzai attributes[:reference_type] ||= self.class.reference_type attributes.delete(:original) if context[:no_original_data] - attributes.map { |key, value| %Q(data-#{key.to_s.dasherize}="#{escape_once(value)}") }.join(" ") + attributes.map do |key, value| + %Q(data-#{key.to_s.dasherize}="#{escape_once(value)}") + end.join(' ') end def escape_once(html) |