jekyll-spaceship 0.9.8 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -1
- data/lib/jekyll-spaceship/cores/config.rb +3 -0
- data/lib/jekyll-spaceship/cores/manager.rb +13 -0
- data/lib/jekyll-spaceship/cores/processor.rb +47 -1
- data/lib/jekyll-spaceship/processors/emoji-processor.rb +24 -6
- data/lib/jekyll-spaceship/processors/mathjax-processor.rb +30 -11
- data/lib/jekyll-spaceship/processors/media-processor.rb +50 -11
- data/lib/jekyll-spaceship/processors/table-processor.rb +19 -11
- data/lib/jekyll-spaceship/version.rb +1 -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: a416b7cf9c8e911656cded0ab54e172ef344f3efd767647c11357c40cc95733e
|
4
|
+
data.tar.gz: d0b73825b4ad8ef33b5cd39f34902159aa29110d36cf4a33b0989ea4aeecb30a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb35ba184747e58e6a5ab3d30f3140f347ed27729050a281da36dd72990cf63a3eed0a9a8c3058b4bf14f529ebfc9c318c2c0495ccec78145d86a786343dda49
|
7
|
+
data.tar.gz: 8ba26f392d63e59cbc7bab80849608cc723ee05839e3f696757e0a23664b5ec491251ff39dfdd11bc530833e07028413a94b3bfa0a1ff98211c2255400b6ccd5
|
data/README.md
CHANGED
@@ -112,6 +112,7 @@ Spaceship is a minimalistic, powerful and extremely customizable [Jekyll](https:
|
|
112
112
|
- [5.2 Vimeo Usage](#vimeo-usage)
|
113
113
|
- [5.3 DailyMotion Usage](#dailymotion-usage)
|
114
114
|
- [5.4 Spotify Usage](#spotify-usage)
|
115
|
+
- [5.4 Spotify Podcast Usage](#spotify-podcast-usage)
|
115
116
|
- [5.5 SoundCloud Usage](#soundcloud-usage)
|
116
117
|
- [5.6 General Video Usage](#general-video-usage)
|
117
118
|
- [5.7 General Audio Usage](#general-audio-usage)
|
@@ -441,7 +442,7 @@ Code above would be parsed as:
|
|
441
442
|
#### Cell Alignment
|
442
443
|
|
443
444
|
Markdown table syntax use colons ":" for forcing column alignment.
|
444
|
-
Therefore, here we also use it for
|
445
|
+
Therefore, here we also use it for forcing cell alignment.
|
445
446
|
|
446
447
|
Table cell can be set alignment separately.
|
447
448
|
|
@@ -791,6 +792,15 @@ the link as below:
|
|
791
792
|
|
792
793
|
<image width="600" src="https://user-images.githubusercontent.com/9413601/89762618-5d11b000-db23-11ea-81db-35cc3682b234.png">
|
793
794
|
|
795
|
+
#### Spotify Podcast Usage
|
796
|
+
|
797
|
+
```markdown
|
798
|
+
![](https://open.spotify.com/episode/31AxcwYdjsFtStds5JVWbT)
|
799
|
+
```
|
800
|
+
|
801
|
+
<image width="600" src="https://user-images.githubusercontent.com/9413601/133599796-1d213033-8184-4059-9ec2-5415e50c94dc.png">
|
802
|
+
|
803
|
+
|
794
804
|
#### SoundCloud Usage
|
795
805
|
|
796
806
|
```markdown
|
@@ -64,7 +64,10 @@ module Jekyll::Spaceship
|
|
64
64
|
def self.load_config
|
65
65
|
# post load site config for `group :jekyll_plugin`
|
66
66
|
Jekyll::Hooks.register :site, :after_init do |site|
|
67
|
+
# load config
|
67
68
|
self.load(site.config)
|
69
|
+
# dispatch site after_init event
|
70
|
+
Manager.dispatch(site, :site, :after_init)
|
68
71
|
end
|
69
72
|
end
|
70
73
|
end
|
@@ -14,6 +14,7 @@ module Jekyll::Spaceship
|
|
14
14
|
container = _register.first
|
15
15
|
events = _register.last.uniq
|
16
16
|
events = events.select do |event|
|
17
|
+
next true if event.match(/^after/)
|
17
18
|
next true if event.match(/^post/)
|
18
19
|
next events.index(event.to_s.gsub(/^pre/, 'post').to_sym).nil?
|
19
20
|
end
|
@@ -57,23 +58,35 @@ module Jekyll::Spaceship
|
|
57
58
|
end
|
58
59
|
|
59
60
|
def self.dispatch(page, container, event)
|
61
|
+
# dispatch to each processor
|
60
62
|
@@_processors.each do |processor|
|
61
63
|
processor.dispatch page, container, event
|
64
|
+
break unless processor.next?
|
62
65
|
end
|
63
66
|
if event.to_s.start_with?('post') and Type.html? output_ext(page)
|
64
67
|
self.dispatch_html_block(page)
|
65
68
|
end
|
69
|
+
# update page excerpt
|
70
|
+
@@_processors.each do |processor|
|
71
|
+
next unless processor.handled
|
72
|
+
next unless page.is_a? Jekyll::Document
|
73
|
+
break page.data['excerpt'] = Jekyll::Excerpt.new(page)
|
74
|
+
end
|
75
|
+
# call on_handled
|
66
76
|
@@_processors.each do |processor|
|
67
77
|
processor.on_handled if processor.handled
|
78
|
+
break unless processor.next?
|
68
79
|
end
|
69
80
|
end
|
70
81
|
|
71
82
|
def self.ext(page)
|
83
|
+
return unless page.respond_to? :path
|
72
84
|
ext = page.path.match(/\.[^.]+$/)
|
73
85
|
ext.to_s.rstrip
|
74
86
|
end
|
75
87
|
|
76
88
|
def self.output_ext(page)
|
89
|
+
return unless page.respond_to? :url_placeholders
|
77
90
|
page.url_placeholders[:output_ext]
|
78
91
|
end
|
79
92
|
|
@@ -90,6 +90,10 @@ module Jekyll::Spaceship
|
|
90
90
|
def self.config
|
91
91
|
end
|
92
92
|
|
93
|
+
def next?
|
94
|
+
true
|
95
|
+
end
|
96
|
+
|
93
97
|
def process?
|
94
98
|
Type.html?(output_ext) or Type.markdown?(ext)
|
95
99
|
end
|
@@ -188,12 +192,28 @@ module Jekyll::Spaceship
|
|
188
192
|
while @exclusion_store.size > 0
|
189
193
|
match = @exclusion_store.pop
|
190
194
|
id = @exclusion_store.size
|
191
|
-
content = content.sub(
|
195
|
+
content = content.sub(
|
196
|
+
"<!JEKYLL@#{object_id}@#{id}>"
|
197
|
+
) { match }
|
192
198
|
end
|
193
199
|
@exclusion_store = []
|
194
200
|
content
|
195
201
|
end
|
196
202
|
|
203
|
+
def get_exclusion(id)
|
204
|
+
result = nil
|
205
|
+
match_data = id.match /<!JEKYLL@(.+)@(.+)>/
|
206
|
+
unless match_data.nil?
|
207
|
+
id = match_data[2].to_i
|
208
|
+
result = {
|
209
|
+
:id => id,
|
210
|
+
:marker => match_data[0],
|
211
|
+
:content => @exclusion_store[id]
|
212
|
+
}
|
213
|
+
end
|
214
|
+
result
|
215
|
+
end
|
216
|
+
|
197
217
|
def self.escape_html(content)
|
198
218
|
# escape link
|
199
219
|
content.scan(/((https?:)?\/\/\S+\?[a-zA-Z0-9%\-_=\.&;]+)/) do |result|
|
@@ -237,5 +257,31 @@ module Jekyll::Spaceship
|
|
237
257
|
"<img class=\"#{css_class}\" src=\"#{body}\">"
|
238
258
|
end
|
239
259
|
end
|
260
|
+
|
261
|
+
def self.handle_bang_link(
|
262
|
+
content,
|
263
|
+
url = '(https?:)?\\/\\/.*',
|
264
|
+
title = '("(.*)".*){0,1}',
|
265
|
+
&block
|
266
|
+
)
|
267
|
+
# pre-handle reference-style links
|
268
|
+
regex = /(\[(.*)\]:\s*(#{url}\s*#{title}))/
|
269
|
+
content.scan regex do |match_data|
|
270
|
+
match = match_data[0]
|
271
|
+
ref_name = match_data[1]
|
272
|
+
ref_value = match_data[2]
|
273
|
+
content = content.gsub(match, '')
|
274
|
+
.gsub(/\!\[(.*)\]\s*\[#{ref_name}\]/,
|
275
|
+
"![\1](#{ref_value})")
|
276
|
+
end
|
277
|
+
|
278
|
+
# handle inline-style links
|
279
|
+
regex = /(\!\[(.*)\]\(.*#{url}\s*#{title}\))/
|
280
|
+
content.scan regex do |match_data|
|
281
|
+
url = match_data[2]
|
282
|
+
title = match_data[6]
|
283
|
+
block.call(url, title)
|
284
|
+
end
|
285
|
+
end
|
240
286
|
end
|
241
287
|
end
|
@@ -37,15 +37,31 @@ module Jekyll::Spaceship
|
|
37
37
|
def emoji_filter(content, selector)
|
38
38
|
# use nokogiri to parse html
|
39
39
|
doc = Nokogiri::HTML(content)
|
40
|
+
|
40
41
|
body = doc.at('body')
|
41
42
|
|
43
|
+
# in case of a page has no the body node, especially when your
|
44
|
+
# page's layout field of front matter is nil or unavailable
|
45
|
+
return content if body.nil?
|
46
|
+
|
47
|
+
# Count for restoration
|
48
|
+
escaped_count = 0
|
49
|
+
|
42
50
|
# filter nodes (pre, code)
|
43
|
-
|
44
|
-
|
51
|
+
body.css(selector).each do |node|
|
52
|
+
count = escaped_count
|
53
|
+
|
45
54
|
# handle emoji markup
|
46
|
-
|
47
|
-
|
48
|
-
)
|
55
|
+
inner_html = node.inner_html.gsub(
|
56
|
+
/(?<!\\):([\w\d+-]+?)(?<!\\):/
|
57
|
+
) do |match|
|
58
|
+
escaped_count += 1
|
59
|
+
"\\:#{match[1..-2]}\\:"
|
60
|
+
end
|
61
|
+
|
62
|
+
if escaped_count > count
|
63
|
+
node.inner_html = inner_html
|
64
|
+
end
|
49
65
|
end
|
50
66
|
|
51
67
|
# parse the emoji
|
@@ -68,8 +84,10 @@ module Jekyll::Spaceship
|
|
68
84
|
|
69
85
|
body.inner_html = content
|
70
86
|
|
87
|
+
return doc.to_html if escaped_count.zero?
|
88
|
+
|
71
89
|
# restore nodes (pre, code)
|
72
|
-
|
90
|
+
body.css(selector).each do |node|
|
73
91
|
# handle emoji markup
|
74
92
|
node.inner_html = node.inner_html.gsub(
|
75
93
|
/\\:([\w\d+-]+?)\\:/, ':\1:'
|
@@ -45,6 +45,7 @@ module Jekyll::Spaceship
|
|
45
45
|
escaped_expr = expr
|
46
46
|
.gsub(/(?<!^)\\(?!\S$)/, '\\\\\\\\')
|
47
47
|
.gsub(/(?<!\\)\$\$/, '\\\$\\\$')
|
48
|
+
.gsub(/\\\\(?=\s)/, '\\\\\\\\\\')
|
48
49
|
.gsub(/\\ /, '\\\\\\ ')
|
49
50
|
content = content.gsub(expr, escaped_expr)
|
50
51
|
end
|
@@ -92,7 +93,7 @@ module Jekyll::Spaceship
|
|
92
93
|
r&.each do |i|
|
93
94
|
btag = Regexp.escape(i[0])
|
94
95
|
etag = Regexp.escape(i[1])
|
95
|
-
patterns <<= /((?<!\\\\)#{btag}(
|
96
|
+
patterns <<= /((?<!\\\\)#{btag}([\s\S]*?)(?<!\\\\)#{etag})/
|
96
97
|
end
|
97
98
|
end
|
98
99
|
end
|
@@ -107,17 +108,35 @@ module Jekyll::Spaceship
|
|
107
108
|
|
108
109
|
def scan_mathjax_expression(doc, &block)
|
109
110
|
patterns = get_math_patterns()
|
110
|
-
doc
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
111
|
+
doc = doc.clone
|
112
|
+
|
113
|
+
# remove code, pre, figure nodes
|
114
|
+
doc.css('body code, body pre, body figure').each do |node|
|
115
|
+
node.remove
|
116
|
+
end
|
117
|
+
|
118
|
+
# remove scripting mathjax expression
|
119
|
+
doc.css('body script').each do |node|
|
120
|
+
next if node['type']&.match(/math\/tex/)
|
121
|
+
node.remove
|
122
|
+
end
|
123
|
+
|
124
|
+
# scan mathjax expressions
|
125
|
+
doc.css('body *').each do |node|
|
126
|
+
# filter invalid nodes
|
127
|
+
next if node.children.size == 0
|
128
|
+
invalid = false
|
129
|
+
node.children.each do |child|
|
130
|
+
unless [
|
131
|
+
'text', 'br', 'span',
|
132
|
+
'img', 'svg', 'a'
|
133
|
+
].include? child.name
|
134
|
+
break invalid = true
|
120
135
|
end
|
136
|
+
end
|
137
|
+
next if invalid
|
138
|
+
|
139
|
+
patterns['include'].each do |pattern|
|
121
140
|
# check normal mathjax expression
|
122
141
|
node.content.scan(pattern) do |result|
|
123
142
|
expr = result[0]
|
@@ -30,6 +30,7 @@ module Jekyll::Spaceship
|
|
30
30
|
handle_vimeo(element)
|
31
31
|
handle_dailymotion(element)
|
32
32
|
handle_spotify(element)
|
33
|
+
handle_spotify_podcast(element)
|
33
34
|
handle_soundcloud(element)
|
34
35
|
end
|
35
36
|
doc.to_html
|
@@ -42,7 +43,7 @@ module Jekyll::Spaceship
|
|
42
43
|
handle_media(element, {
|
43
44
|
media_type: 'audio',
|
44
45
|
host: '(https?:\\/\\/)?.*\\/',
|
45
|
-
id: '(.+?\\.(mp3|wav|ogg|mid|midi|aac|wma))'
|
46
|
+
id: '(.+?\\.(mp3|wav|ogg|mid|midi|aac|wma))'
|
46
47
|
})
|
47
48
|
end
|
48
49
|
|
@@ -53,7 +54,7 @@ module Jekyll::Spaceship
|
|
53
54
|
# ![video](//techslides.com/demos/sample-videos/small.mp4?width=400)
|
54
55
|
def handle_normal_video(element)
|
55
56
|
handle_media(element, {
|
56
|
-
media_type: '
|
57
|
+
media_type: 'video',
|
57
58
|
host: '(https?:\\/\\/)?.*\\/',
|
58
59
|
id: '(.+?\\.(avi|mp4|webm|ogg|ogv|flv|mkv|mov|wmv|3gp|rmvb|asf))'
|
59
60
|
})
|
@@ -90,8 +91,8 @@ module Jekyll::Spaceship
|
|
90
91
|
def handle_dailymotion(element)
|
91
92
|
handle_media(element, {
|
92
93
|
media_type: 'iframe',
|
93
|
-
host: '(https?:)
|
94
|
-
id: '(
|
94
|
+
host: '(https?:)?\\/\\/(?>www\\.)?dai\\.?ly(?>motion\\.com\\/video)?\\/',
|
95
|
+
id: '([a-zA-Z0-9\\_\\-]+)',
|
95
96
|
base_url: "https://www.dailymotion.com/embed/video/"
|
96
97
|
})
|
97
98
|
end
|
@@ -109,6 +110,19 @@ module Jekyll::Spaceship
|
|
109
110
|
})
|
110
111
|
end
|
111
112
|
|
113
|
+
# Examples:
|
114
|
+
# ![spotify podcast](//open.spotify.com/episode/31AxcwYdjsFtStds5JVWbT)
|
115
|
+
# ![spotify podcast](//open.spotify.com/episode/44gfWHnwbmSY7Euw6Nb39k?width=400)
|
116
|
+
def handle_spotify_podcast(element)
|
117
|
+
handle_media(element, {
|
118
|
+
media_type: 'iframe',
|
119
|
+
host: '(https?:)?\\/\\/open\\.spotify\\.com\\/episode\\/',
|
120
|
+
id: '(?<=episode\\/)([a-zA-Z0-9\\_\\-]+)',
|
121
|
+
base_url: "https://open.spotify.com/embed/episode/",
|
122
|
+
height: 152
|
123
|
+
})
|
124
|
+
end
|
125
|
+
|
112
126
|
# Examples:
|
113
127
|
# ![soundcloud](//soundcloud.com/aviciiofficial/preview-avicii-vs-lenny)
|
114
128
|
def handle_soundcloud(element)
|
@@ -128,7 +142,7 @@ module Jekyll::Spaceship
|
|
128
142
|
src = element.get_attribute('src')
|
129
143
|
title = element.get_attribute('title')
|
130
144
|
id = data[:id_from] === 'html' ? '()' : data[:id]
|
131
|
-
match_data = src
|
145
|
+
match_data = src&.match(/#{host}#{id}\S*/)
|
132
146
|
return if match_data.nil?
|
133
147
|
|
134
148
|
media_type = data[:media_type]
|
@@ -158,6 +172,10 @@ module Jekyll::Spaceship
|
|
158
172
|
cfg['loop'] = qs['loop'] || data[:loop] || cfg['loop']
|
159
173
|
cfg['style'] += ';display: none;' if qs['hidden']
|
160
174
|
handle_audio(element, { cfg: cfg })
|
175
|
+
when 'video'
|
176
|
+
cfg['autoplay'] = qs['autoplay'] || data[:autoplay] || cfg['autoplay']
|
177
|
+
cfg['loop'] = qs['loop'] || data[:loop] || cfg['loop']
|
178
|
+
handle_video(element, { cfg: cfg })
|
161
179
|
when 'iframe'
|
162
180
|
cfg['title'] = title
|
163
181
|
cfg['width'] = qs['width'] || data[:width] || cfg['width']
|
@@ -179,12 +197,32 @@ module Jekyll::Spaceship
|
|
179
197
|
" src=\"#{cfg['src']}\""\
|
180
198
|
" style=\"#{cfg['style']}\""\
|
181
199
|
" controls>" \
|
182
|
-
"
|
200
|
+
" Your browser doesn't support HTML5 audio."\
|
183
201
|
" Here is a <a href=\"#{cfg['src']}\">link to download the audio</a>"\
|
184
|
-
"instead.
|
202
|
+
" instead."\
|
185
203
|
"</audio>"
|
186
|
-
doc = Nokogiri::
|
187
|
-
element.
|
204
|
+
doc = Nokogiri::HTML(html)
|
205
|
+
return if element.parent.nil?
|
206
|
+
element.replace(doc.at('body').children.first)
|
207
|
+
end
|
208
|
+
|
209
|
+
def handle_video(element, data)
|
210
|
+
cfg = data[:cfg]
|
211
|
+
html = "<video"\
|
212
|
+
" id=\"#{cfg['id']}\""\
|
213
|
+
" class=\"#{cfg['class']}\""\
|
214
|
+
" style=\"#{cfg['style']}\""\
|
215
|
+
" #{cfg['autoplay'] ? 'autoplay' : ''}"\
|
216
|
+
" #{cfg['loop'] ? 'loop' : ''}"\
|
217
|
+
" controls>" \
|
218
|
+
" <source src=\"#{cfg['src']}\">" \
|
219
|
+
" Your browser doesn't support HTML5 video."\
|
220
|
+
" Here is a <a href=\"#{cfg['src']}\">link to download the video</a>"\
|
221
|
+
" instead."\
|
222
|
+
"</video>"
|
223
|
+
doc = Nokogiri::HTML(html)
|
224
|
+
return if element.parent.nil?
|
225
|
+
element.replace(doc.at('body').children.first)
|
188
226
|
end
|
189
227
|
|
190
228
|
def handle_iframe(element, data)
|
@@ -201,8 +239,9 @@ module Jekyll::Spaceship
|
|
201
239
|
" frameborder=\"#{cfg['frameborder']}\""\
|
202
240
|
" allowfullscreen>"\
|
203
241
|
"</iframe>"
|
204
|
-
doc = Nokogiri::
|
205
|
-
element.
|
242
|
+
doc = Nokogiri::HTML(html)
|
243
|
+
return if element.parent.nil?
|
244
|
+
element.replace(doc.at('body').children.first)
|
206
245
|
end
|
207
246
|
|
208
247
|
def get_id_from_html(url, pattern)
|
@@ -18,13 +18,21 @@ module Jekyll::Spaceship
|
|
18
18
|
end
|
19
19
|
if references.size > 0
|
20
20
|
content.scan(/[^\n]*(?<!\\)\|[^\n]*/) do |result|
|
21
|
+
replace = result
|
21
22
|
references.each do |key, val|
|
22
|
-
replace =
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
content = content.gsub(result, replace)
|
23
|
+
replace = replace.gsub(
|
24
|
+
/\[([^\n\]]*?)\]\s*\[#{Regexp.escape(key)}\]/,
|
25
|
+
"[\\1](#{val})"
|
26
|
+
)
|
27
27
|
end
|
28
|
+
references.each do |key, val|
|
29
|
+
replace = replace.gsub(
|
30
|
+
/\[#{Regexp.escape(key)}\](?!\s*\(.*?\))/,
|
31
|
+
"[#{key}](#{val})"
|
32
|
+
)
|
33
|
+
end
|
34
|
+
next if result == replace
|
35
|
+
content = content.gsub(result, replace)
|
28
36
|
end
|
29
37
|
end
|
30
38
|
|
@@ -87,7 +95,6 @@ module Jekyll::Spaceship
|
|
87
95
|
handle_multi_rows(data)
|
88
96
|
handle_text_align(data)
|
89
97
|
handle_rowspan(data)
|
90
|
-
handle_attr_list(data)
|
91
98
|
end
|
92
99
|
end
|
93
100
|
rows.each do |row|
|
@@ -95,6 +102,7 @@ module Jekyll::Spaceship
|
|
95
102
|
cells.each do |cell|
|
96
103
|
data.cell = cell
|
97
104
|
handle_format(data)
|
105
|
+
handle_attr_list(data)
|
98
106
|
end
|
99
107
|
end
|
100
108
|
self.handled = true
|
@@ -143,10 +151,10 @@ module Jekyll::Spaceship
|
|
143
151
|
end
|
144
152
|
end
|
145
153
|
|
146
|
-
result = cell.
|
154
|
+
result = cell.inner_html.match(/(\|)+$/)
|
147
155
|
return if result.nil?
|
148
156
|
|
149
|
-
cell.
|
157
|
+
cell.inner_html = cell.inner_html.gsub(/(\|)+$/, '')
|
150
158
|
result = result[0]
|
151
159
|
colspan = result.scan(/\|/).count
|
152
160
|
scope.row.colspan += colspan
|
@@ -203,8 +211,8 @@ module Jekyll::Spaceship
|
|
203
211
|
|
204
212
|
# handle rowspan
|
205
213
|
span_cell = scope.table.span_row_cells[scope.row.col_index]
|
206
|
-
if span_cell and cell.
|
207
|
-
cell.
|
214
|
+
if span_cell and cell.inner_html.match(/^\s*\^{2}/)
|
215
|
+
cell.inner_html = cell.inner_html.gsub(/^\s*\^{2}/, '')
|
208
216
|
span_cell.inner_html += "\n<br>\n#{cell.inner_html}"
|
209
217
|
rowspan = span_cell.get_attribute('rowspan') || 1
|
210
218
|
rowspan = rowspan.to_i + 1
|
@@ -264,7 +272,7 @@ module Jekyll::Spaceship
|
|
264
272
|
content = cell.inner_html
|
265
273
|
# inline attribute list(IAL) handler
|
266
274
|
ial_handler = ->(list) do
|
267
|
-
list.scan(/(\S+)=("|')(.*?)\2|(\S+)/) do |attr|
|
275
|
+
list.scan(/(\S+)=(”|"|')(.*?)\2|(\S+)/) do |attr|
|
268
276
|
key = attr[0]
|
269
277
|
val = attr[2]
|
270
278
|
single = attr[3]
|
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.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jeffreytse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|