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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c5958da36843569e59519ea1ccf58975c8604a2f087d9b0a21c2b0b85c945773
4
- data.tar.gz: c1fb3d763996a86bc7ca3dadf0a72b2afcbeb8cfad7196c6099e9dd82dd77751
3
+ metadata.gz: c3696b91551d20df8b09f16875aaffa95a1910c5dc5ded8b0706cee7c11f4a9a
4
+ data.tar.gz: 1e8544cacc2c1f7891bb5f1cb0b68ebf97babc923301fa2226f702ac175f6b65
5
5
  SHA512:
6
- metadata.gz: 92953692e95d66d1913d8a924b8db826379168e7fb2746501f1f693f8183fe00a320b29a47c3163915f88329d94ac7dde0bf14ffb760ae9c5931be54f7a157e7
7
- data.tar.gz: ef822540e419bdc92f6a154ae388120f07289f499bb6f8e95888d3d9c44339ecfed3b5e550d4e5b1d38e89c74ed6f13e68e29084ee15cb628479c0ad950af420
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
- refs << l if l.strip!.match(/^\[.*\]:.*\".*\"$/i)
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)
@@ -3,6 +3,6 @@
3
3
  module Jekyll
4
4
  module Premonition
5
5
  # Make sure to change this manually before a release.
6
- VERSION = '4.0.0'
6
+ VERSION = '4.0.1'
7
7
  end
8
8
  end
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.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: 2020-04-13 00:00:00.000000000 Z
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: []