no-style-please2-plugins 0.9.2 → 0.9.4.1

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ext.rb +10 -2
  3. data/lib/version/version.rb +1 -1
  4. data/test.rb +11 -0
  5. metadata +3 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c22eda87dd6c5e877b7bc2d470afa501b7ef742c734d7ee07e8836a4b8e2ac4
4
- data.tar.gz: b9edd70a04cf08d97b1002947c06909a0a3e579cad5c1a43881fb75ee90287eb
3
+ metadata.gz: 3f84aaca70cfa2fd5529ce64498665d95530e70e63e2a59ab59aeae3b2755e2e
4
+ data.tar.gz: cbaf51294b7abc3f5bd44f00737c0df60f84cdb5793f90080dd2e721efe668bb
5
5
  SHA512:
6
- metadata.gz: d8cb23f4f676001cf336518a905c24fefeba90528557e015e0c8f2011c41ac7ab5eb8b4af825b8d2e26a4f30bb5220f45421410a20062f1410f32682f2909937
7
- data.tar.gz: e7bd9f098201c95e1736ab53e01bd30f94938dd73558659a3c902f31b0b47768e43e07c105bc2774fb7061c28abfd2da1e2df21521131ca3642d66f30105d617
6
+ metadata.gz: 8969d7ce88b0737df3c3fc43fbc41c1f963a30b2c6230ba2d5e4c7cc119524b850fe7760f2e14abf2c8e1f423bd33520addaf6ae5ae06538f2b9fa9a2641fd5b
7
+ data.tar.gz: e2e0b2a3aea16f1aaf96f1d37263a244b717d2eb84129dbdc5f4c5bc75776561a6775724b80c8868d2cba7338c7f6744ec070abed17e052223dfadf3f17fcad7
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
- filePath = "#{rootPath}/#{text}".strip!()
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:#{text} failed"
168
+ @filecontent = "load file:#{filePath} failed"
161
169
 
162
170
  end
163
171
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NoStylePlease2
4
- VERSION = "0.9.2"
4
+ VERSION = "0.9.4.1"
5
5
  end
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,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: no-style-please2-plugins
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - vitock
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-01-17 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: jekyll
@@ -76,7 +75,6 @@ metadata:
76
75
  homepage_uri: https://github.com/vitock/no-style-please2-plugins
77
76
  source_code_uri: https://github.com/vitock/no-style-please2-plugins
78
77
  changelog_uri: https://github.com/vitock/no-style-please2-plugins/blob/main/LICENSE
79
- post_install_message:
80
78
  rdoc_options: []
81
79
  require_paths:
82
80
  - lib
@@ -91,8 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
89
  - !ruby/object:Gem::Version
92
90
  version: '0'
93
91
  requirements: []
94
- rubygems_version: 3.4.1
95
- signing_key:
92
+ rubygems_version: 3.6.7
96
93
  specification_version: 4
97
94
  summary: plugins for jekyll theme no-style-please2
98
95
  test_files: []