i18nliner 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/i18nliner/extensions/core.rb +4 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9f3816293c70dfd95ca1cd66cb80d611f283c416e2dc0bd9eec08723d33f32e
|
4
|
+
data.tar.gz: e41ce0ba376064862cc64d063b2ac2cdf48002136446079f403255e9cb6a69b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b31d8fdd70c548e770d92584e9c35f6ce15ca60a6bc8a1d835cb2b90653b6de63029d35fcd2465245d473f1cab5914634a290faa344c8a5ec0e115dfcb4947b1
|
7
|
+
data.tar.gz: 90a338c6438b59dfa6b0f51af4f4c97b747b068390e975f68e8a6af9ba5ddf3b0c735ffc2e46ca7fe63effc8c5ce2f037e6a808b6a50ae197a9d5110a5088895
|
@@ -19,12 +19,13 @@ module I18nliner
|
|
19
19
|
wrappers = options.delete(:wrappers) || options.delete(:wrapper)
|
20
20
|
result = super(key, options)
|
21
21
|
|
22
|
-
#
|
23
|
-
|
24
|
-
return result if result.nil? || result.instance_of?(Object)
|
22
|
+
# Exit now unless we have a string or a thing that delegates to a string
|
23
|
+
return result unless result.respond_to?(:gsub)
|
25
24
|
|
25
|
+
was_html_safe = result.html_safe?
|
26
26
|
# If you are actually using nonprintable characters in your source string, you should feel ashamed
|
27
27
|
result = result.gsub("\\\\", "\uE124").gsub("\\*", "\uE123")
|
28
|
+
result = result.html_safe if was_html_safe
|
28
29
|
if wrappers
|
29
30
|
result = apply_wrappers(result, wrappers)
|
30
31
|
end
|