qiita-markdown 0.38.0 → 0.39.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0133d912562a9dcb693c507e7ec0caadb6ca0c509da6af2c57773d87a2af745
4
- data.tar.gz: 997e0e521830183eccc1f009634352379a7697a8a9e95edb9bae1a9d4f4f7c78
3
+ metadata.gz: fdacf171e87076c382a0a48c3470a46e7334965d3818a7b4041c8bd6d2a9af6c
4
+ data.tar.gz: e97066c81cca4c192b97de5956e6e7615a3946bcf5e3790d04d00908829a16f7
5
5
  SHA512:
6
- metadata.gz: 44318b683d2df089695d572a037ec393c495dd23a3d48f82be77287165eff54d3e7d1fb68143f4ad7004eca337df8ed83cfcdd921de6fe7133aaaddeaffe7248
7
- data.tar.gz: 883a123e2dad403e8da8d87457be977270ac7dad837e2502d873aa3208e024e2593d784ae0105923658243771d497232e6776a5011a4e354df995447d8fe7c49
6
+ metadata.gz: 10b64682c5df3911eb1674315695b9798ac34f6877f553c477a4dfe67a43bcd2a731f4bbc6f24ef52b3930aeee527bd23469c8d691c0f3ab3fcb40e294c552ea
7
+ data.tar.gz: 1eca7b100285a88879a580ced3f868bc620b06c1181850e6082f3ac53ef7f7263db8da514b33c315ee402511d7c83ad1a7b20cd0ed4406efe1d08f23e9e5f645
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 0.39.0
4
+ - Fix an error when custom block type is empty
5
+
3
6
  ## 0.38.0
4
7
  - Change default syntax highlighter from pygments to rouge
5
8
 
@@ -18,9 +18,11 @@ module Qiita
18
18
  attr_reader :type, :subtype
19
19
 
20
20
  # @param text [String, nil]
21
+ # @note Attribute `type` will be nil if `text` is nil
22
+ # @note Attribute `subtype` will be nil if `text` does not include white space.
21
23
  def initialize(text)
22
24
  # Discared after the second word.
23
- @type, @subtype = text.split(" ")
25
+ @type, @subtype = text && text.split(" ")
24
26
  end
25
27
  end
26
28
 
@@ -1,5 +1,5 @@
1
1
  module Qiita
2
2
  module Markdown
3
- VERSION = "0.38.0"
3
+ VERSION = "0.39.0"
4
4
  end
5
5
  end
@@ -1690,6 +1690,24 @@ describe Qiita::Markdown::Processor do
1690
1690
  MARKDOWN
1691
1691
  end
1692
1692
 
1693
+ context "when type is empty" do
1694
+ if allowed
1695
+ it "returns simple div element" do
1696
+ should eq <<-HTML.strip_heredoc
1697
+ <div data-type="customblock">Some kind of text is here.
1698
+ </div>
1699
+ HTML
1700
+ end
1701
+ else
1702
+ it "returns simple div element" do
1703
+ should eq <<-HTML.strip_heredoc
1704
+ <div>Some kind of text is here.
1705
+ </div>
1706
+ HTML
1707
+ end
1708
+ end
1709
+ end
1710
+
1693
1711
  context "when type is not allowed" do
1694
1712
  let(:type) { "anytype" }
1695
1713
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qiita-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.38.0
4
+ version: 0.39.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-07 00:00:00.000000000 Z
11
+ date: 2021-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gemoji
@@ -234,7 +234,7 @@ dependencies:
234
234
  - - '='
235
235
  - !ruby/object:Gem::Version
236
236
  version: 0.49.1
237
- description:
237
+ description:
238
238
  email:
239
239
  - r7kamura@gmail.com
240
240
  executables: []
@@ -301,7 +301,7 @@ homepage: https://github.com/increments/qiita-markdown
301
301
  licenses:
302
302
  - MIT
303
303
  metadata: {}
304
- post_install_message:
304
+ post_install_message:
305
305
  rdoc_options: []
306
306
  require_paths:
307
307
  - lib
@@ -316,8 +316,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
316
316
  - !ruby/object:Gem::Version
317
317
  version: '0'
318
318
  requirements: []
319
- rubygems_version: 3.0.3
320
- signing_key:
319
+ rubygems_version: 3.1.4
320
+ signing_key:
321
321
  specification_version: 4
322
322
  summary: Qiita-specified markdown processor.
323
323
  test_files: