html-pipeline-negarmoji 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abf58f54680cbc7e239817a53f882ad18de06ebb10783f83f8aca2e2995f5c72
|
4
|
+
data.tar.gz: 4b9fcce07af7601049e77d9a915de4f9e27bd16480a09d7e864eefb67ebc4596
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 442f0f8deae3bdcb210456ac47d13289a8ecd354c0177f2d372c56c2020ecc903cd335451a6c92a8c9eec8f37cf5e8295f798acaa72e0225666cf7779978b2fa
|
7
|
+
data.tar.gz: 4191931efa9d23984567a3b0dc6c713a93714c418e0c3117f1f2f111fa15012c98807b7f1f528cd9fcf1c39b894fdd05944ee0cfd03b89d4e08599700018b059
|
@@ -10,7 +10,7 @@ module HTML
|
|
10
10
|
# Implements new filters used by Negareh Emoji HTML Pipeline
|
11
11
|
|
12
12
|
# Custom filter implementations
|
13
|
-
autoload :NegarehEmojiFilter, "negarmoji-pipeline/filter"
|
13
|
+
autoload :NegarehEmojiFilter, "html/pipeline/negarmoji-pipeline/filter"
|
14
14
|
|
15
15
|
def initialize(filters)
|
16
16
|
@filters = filters.flatten.freeze
|
@@ -96,10 +96,8 @@ module HTML
|
|
96
96
|
html_attrs =
|
97
97
|
default_img_attrs(name)
|
98
98
|
.merge!((context[:img_attrs] || {}).with_indifferent_access)
|
99
|
-
.map
|
100
|
-
|
101
|
-
end
|
102
|
-
.reject(&:blank?).join(" ")
|
99
|
+
.map { |attr, value| !value.nil? && %(#{attr}="#{value.respond_to?(:call) && value.call(name) || value}") }
|
100
|
+
.reject(&:blank?).join(" ".freeze)
|
103
101
|
|
104
102
|
"<img #{html_attrs}>"
|
105
103
|
end
|