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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/qiita/markdown/filters/custom_block.rb +3 -1
- data/lib/qiita/markdown/version.rb +1 -1
- data/spec/qiita/markdown/processor_spec.rb +18 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdacf171e87076c382a0a48c3470a46e7334965d3818a7b4041c8bd6d2a9af6c
|
4
|
+
data.tar.gz: e97066c81cca4c192b97de5956e6e7615a3946bcf5e3790d04d00908829a16f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10b64682c5df3911eb1674315695b9798ac34f6877f553c477a4dfe67a43bcd2a731f4bbc6f24ef52b3930aeee527bd23469c8d691c0f3ab3fcb40e294c552ea
|
7
|
+
data.tar.gz: 1eca7b100285a88879a580ced3f868bc620b06c1181850e6082f3ac53ef7f7263db8da514b33c315ee402511d7c83ad1a7b20cd0ed4406efe1d08f23e9e5f645
|
data/CHANGELOG.md
CHANGED
@@ -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
|
|
@@ -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.
|
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-
|
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.
|
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:
|