premonition 4.0.0 → 4.0.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.
- checksums.yaml +4 -4
- data/lib/premonition/processor.rb +6 -4
- data/lib/premonition/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3696b91551d20df8b09f16875aaffa95a1910c5dc5ded8b0706cee7c11f4a9a
|
4
|
+
data.tar.gz: 1e8544cacc2c1f7891bb5f1cb0b68ebf97babc923301fa2226f702ac175f6b65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9da70c269a26ed2b973677ee951512566314327b800f85884c505687572d6de2ca5733fb5917ae97977ff420c692bed4c96fb2631187f4b858d54174c0ae769f
|
7
|
+
data.tar.gz: 5fa694730310a0191792c921351bdc3b0de26f995b3c7e5df22b693ddcef91f6b2451705c4efac460cfa6770cae5062421ee4e1a09787bcfd1e31930ad98e4c4
|
@@ -24,14 +24,14 @@ module Jekyll
|
|
24
24
|
if is_code_block
|
25
25
|
o << l
|
26
26
|
elsif blockquote?(l) && empty_block?(b)
|
27
|
-
if (m = l.match(/^\s*\>\s+([a-z]+)\s+\"(.*)\"\s+(\[.*\])?\s*$/i))
|
27
|
+
if (m = l.to_s.match(/^\s*\>\s+([a-z]+)\s+\"(.*)\"\s+(\[.*\])?\s*$/i))
|
28
28
|
y, t, attrs = m.captures
|
29
29
|
b = { 'title' => t.strip, 'type' => y.strip.downcase, 'content' => [], 'attrs' => attrs }
|
30
30
|
else
|
31
31
|
o << l
|
32
32
|
end
|
33
33
|
elsif blockquote?(l) && !empty_block?(b)
|
34
|
-
b['content'] << l.match(/^\s*\>\s?(.*)$/i).captures[0]
|
34
|
+
b['content'] << l.to_s.match(/^\s*\>\s?(.*)$/i).captures[0]
|
35
35
|
else
|
36
36
|
if !blockquote?(l) && !empty_block?(b)
|
37
37
|
o << render_block(b, references)
|
@@ -52,13 +52,15 @@ module Jekyll
|
|
52
52
|
def load_references(content)
|
53
53
|
refs = ["\n"]
|
54
54
|
content.each_line do |l|
|
55
|
-
|
55
|
+
unless l.nil? || l == 0 || (l.is_a? String)
|
56
|
+
refs << l if l.to_s.strip!.match(/^\[.*\]:.*\".*\"$/i)
|
57
|
+
end
|
56
58
|
end
|
57
59
|
refs
|
58
60
|
end
|
59
61
|
|
60
62
|
def code_block_line?(line)
|
61
|
-
line.strip.start_with?('~~~')
|
63
|
+
line.strip.start_with?('~~~') || line.strip.start_with?('```')
|
62
64
|
end
|
63
65
|
|
64
66
|
def blockquote?(line)
|
data/lib/premonition/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: premonition
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jakob Vad Nielsen
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -134,7 +134,7 @@ dependencies:
|
|
134
134
|
- - "~>"
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: 0.9.7
|
137
|
-
description:
|
137
|
+
description:
|
138
138
|
email:
|
139
139
|
- jakobvadnielsen@gmail.com
|
140
140
|
executables: []
|
@@ -157,7 +157,7 @@ homepage: http://github.com/lazee/premonition
|
|
157
157
|
licenses:
|
158
158
|
- MIT
|
159
159
|
metadata: {}
|
160
|
-
post_install_message:
|
160
|
+
post_install_message:
|
161
161
|
rdoc_options: []
|
162
162
|
require_paths:
|
163
163
|
- lib
|
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
174
|
version: '0'
|
175
175
|
requirements: []
|
176
176
|
rubygems_version: 3.1.2
|
177
|
-
signing_key:
|
177
|
+
signing_key:
|
178
178
|
specification_version: 4
|
179
179
|
summary: Jekyll generator that will convert special block quotes into message boxes.
|
180
180
|
test_files: []
|