no-style-please2-plugins 0.9.2 → 0.9.4
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/ext.rb +10 -2
- data/lib/version/version.rb +1 -1
- data/test.rb +11 -0
- 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: 450a16c71cf4718757f6373a7edfb471cc81a24e80c4d9298360739b9aa4f62d
|
4
|
+
data.tar.gz: 6c7a0319ddfd0cd887eadcdac6038f0d1fe7b801fabbdbba539fd0dc2347239a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 891bc3333fb3d6192f6853c1acdb11ac4565eed9d70aed320f96414de3a342e0e2ada9755613b4d66e270ea1f0098abd9b5b58a6f593c9fe8d83c94ab34edcc1
|
7
|
+
data.tar.gz: 953b48d83fe57c71c71943d8142782f86c21dbd81484001d764c8fed2e1924544afb32a540505214ad91922670e26b9808b41763cf12070aafb00319aa184a8c
|
data/lib/ext.rb
CHANGED
@@ -151,13 +151,21 @@ module Jekyll
|
|
151
151
|
def initialize(tag_name, text, tokens)
|
152
152
|
|
153
153
|
rootPath = $g_config['code_root_path'] || 'static'
|
154
|
-
|
154
|
+
if text.start_with?("/")
|
155
|
+
filePath = "#{text}"[1..-1].strip!()
|
156
|
+
else
|
157
|
+
filePath = "#{rootPath}/#{text}".strip!()
|
158
|
+
end
|
159
|
+
filePath = File.expand_path(filePath)
|
160
|
+
puts '--------- inluce code-------'
|
161
|
+
puts filePath
|
162
|
+
|
155
163
|
begin
|
156
164
|
file = File.open(filePath)
|
157
165
|
@filecontent = file.read()
|
158
166
|
rescue => exception
|
159
167
|
puts exception
|
160
|
-
@filecontent = "load file:#{
|
168
|
+
@filecontent = "load file:#{filePath} failed"
|
161
169
|
|
162
170
|
end
|
163
171
|
|
data/lib/version/version.rb
CHANGED
data/test.rb
CHANGED
@@ -77,3 +77,14 @@ end.pack('C*')
|
|
77
77
|
puts a.unpack1('H*')
|
78
78
|
|
79
79
|
puts Jekyll::Test.encrypt_content_v2('333333a','00000000000000052f5c9b07ebc4464717978b174c440573df03e2962d98946c')
|
80
|
+
text = "oo"
|
81
|
+
if text.start_with?("/")
|
82
|
+
puts "aaa"
|
83
|
+
else
|
84
|
+
puts "bbb"
|
85
|
+
end
|
86
|
+
|
87
|
+
puts "12334"[1..2]
|
88
|
+
puts "12334"[1...2]
|
89
|
+
puts "12334"[1..-1]
|
90
|
+
puts "12334"[1...-1]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: no-style-please2-plugins
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vitock
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|