jekyll-spaceship 0.8.3 → 0.8.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25f6fbade2f14b20f7a5144628801f0caa203ee2246eb84611e5effc2c2264b6
|
4
|
+
data.tar.gz: f6ec1d64569913303f51ce4c01c4cd1a57fc1a47da4b01f35721c0737a78d007
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b93d15db0794dc3c70960ad6e5471d5bcd3f90ddb0abb16473b471657483ec9cc9f968bfb237729f3cfe7f546a203fb3924c48a06e68429379bfbd66d343f40
|
7
|
+
data.tar.gz: ff4bb5fe973f5aaec4aa2eef63bfbd29c1ba8aabad20b9ef316414c088abb3c64387263beb3930d3d0110a7c6e996bf392ff2065a44f19ecf193fd15a9af046e
|
@@ -65,7 +65,7 @@ module Jekyll::Spaceship
|
|
65
65
|
|
66
66
|
def initialize_exclusions
|
67
67
|
if @@_exclusions.size.zero?
|
68
|
-
self.class.exclude :code, :math
|
68
|
+
self.class.exclude :code, :math, :liquid_filter
|
69
69
|
end
|
70
70
|
@exclusions = @@_exclusions.uniq
|
71
71
|
@@_exclusions.clear
|
@@ -156,15 +156,17 @@ module Jekyll::Spaceship
|
|
156
156
|
@exclusions.each do |type|
|
157
157
|
regex = nil
|
158
158
|
if type == :code
|
159
|
-
regex = /((`+)\s*(\w*)((?:.|\n)*?)\2)/
|
159
|
+
regex = /(((?<!\\)`+)\s*(\w*)((?:.|\n)*?)\2)/
|
160
160
|
elsif type == :math
|
161
161
|
regex = /(((?<!\\)\${1,2})[^\n]*?\1)/
|
162
|
+
elsif type == :liquid_filter
|
163
|
+
regex = /((?<!\\)\{\{[^\n]*?\}\})/
|
162
164
|
end
|
163
165
|
next if regex.nil?
|
164
166
|
content.scan(regex) do |match_data|
|
165
167
|
match = match_data[0]
|
166
168
|
id = @exclusion_store.size
|
167
|
-
content = content.sub(match, "
|
169
|
+
content = content.sub(match, "<!JEKYLL@#{object_id}@#{id}>")
|
168
170
|
@exclusion_store.push match
|
169
171
|
end
|
170
172
|
end
|
@@ -175,7 +177,7 @@ module Jekyll::Spaceship
|
|
175
177
|
while @exclusion_store.size > 0
|
176
178
|
match = @exclusion_store.pop
|
177
179
|
id = @exclusion_store.size
|
178
|
-
content = content.sub("
|
180
|
+
content = content.sub("<!JEKYLL@#{object_id}@#{id}>", match)
|
179
181
|
end
|
180
182
|
@exclusion_store = []
|
181
183
|
content
|
@@ -24,15 +24,16 @@ module Jekyll::Spaceship
|
|
24
24
|
|
25
25
|
# escape plus sign
|
26
26
|
emoji_name = emoji.name.gsub('+', '\\\+')
|
27
|
+
css_class = self.config['css']['class']
|
27
28
|
|
28
29
|
content = content.gsub(
|
29
30
|
/(?<!\=")\s*:#{emoji_name}:\s*(?!"\s)/,
|
30
|
-
"<img class=\"\""\
|
31
|
+
"<img class=\"#{css_class}\""\
|
31
32
|
" title=\":#{emoji.name}:\""\
|
32
33
|
" alt=\":#{emoji.name}:\""\
|
33
34
|
" raw=\"#{emoji.raw}\""\
|
34
35
|
" src=\"#{config['src']}#{emoji.image_filename}\""\
|
35
|
-
" style=\"vertical-align: middle;"\
|
36
|
+
" style=\"vertical-align: middle; display: inline;"\
|
36
37
|
" max-width: 1em; visibility: hidden;\""\
|
37
38
|
" onload=\"this.style.visibility='visible'\""\
|
38
39
|
" onerror=\"this.replaceWith(this.getAttribute('raw'))\">"\
|
@@ -243,7 +243,11 @@ module Jekyll::Spaceship
|
|
243
243
|
.gsub(/(?<!\\)\|/, '\\|')
|
244
244
|
.gsub(/^\s+|\s+$/, '')
|
245
245
|
content = cvter.convert(content)
|
246
|
-
|
246
|
+
content = Nokogiri::HTML.fragment(content)
|
247
|
+
if content.children.first&.name == 'p'
|
248
|
+
content = content.children
|
249
|
+
end
|
250
|
+
cell.inner_html = content.inner_html
|
247
251
|
end
|
248
252
|
end
|
249
253
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-spaceship
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jeffreytse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|