jekyll-uj-powertools 1.0.8 → 1.0.9
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/jekyll-uj-powertools/version.rb +1 -1
- data/lib/jekyll-uj-powertools.rb +11 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69b1080a5753842ce99a31f4672dcfdb49ba3b1854a73f21a57a3a9e80b64e5d
|
4
|
+
data.tar.gz: 3b346f6127275711633ebf4249bf7943856d564c1e624bb4b272f8e584b23ce6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5546fdd6f425b90bfb78984488a4a1251eb92aa24b7566ded1827fb5e6a11e7377220dfdc4440852274a4afcf863d53aa1e3659bb1a96fcfdb37475dc931aed7
|
7
|
+
data.tar.gz: 6089023c4c5d8c57feb8f11e45c0588ab80816e7dd2a9d6b578ac1d480a625277537fddcca545513c6023db91b2e87a345d063166635e77e76b346c961c2729b
|
data/lib/jekyll-uj-powertools.rb
CHANGED
@@ -8,8 +8,18 @@ module Jekyll
|
|
8
8
|
end
|
9
9
|
|
10
10
|
# Escape a string for use in JSON
|
11
|
+
# def uj_json_escape(value)
|
12
|
+
# value
|
13
|
+
# .gsub('\\', '\\\\') # Escape backslashes
|
14
|
+
# .gsub('"', '\"') # Escape double quotes
|
15
|
+
# .gsub("\b", '\\b') # Escape backspace
|
16
|
+
# .gsub("\f", '\\f') # Escape formfeed
|
17
|
+
# .gsub("\n", '\\n') # Escape newline
|
18
|
+
# .gsub("\r", '\\r') # Escape carriage return
|
19
|
+
# .gsub("\t", '\\t') # Escape tab
|
20
|
+
# end
|
11
21
|
def uj_json_escape(value)
|
12
|
-
value.
|
22
|
+
value.to_json[1..-2] # Convert to JSON and remove the surrounding quotes
|
13
23
|
end
|
14
24
|
|
15
25
|
# Increment a global counter that can be accessed from any page then return the new value
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-uj-powertools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ITW Creative Works
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|