qiita-markdown 0.40.0 → 0.40.1

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: b1aef6d79d99a5925a9240aa6de2553ef76ca3059325df9b448a07599c42d40b
4
- data.tar.gz: 319006bd5e853597d99c87d089647f9306a5cd1fcd2e2a56763f3fc574e56f69
3
+ metadata.gz: fc1bf2360894ec069f456681fc8c151c4c2430418be7345364059808315e0dd7
4
+ data.tar.gz: be5fa7ea995f9e9c515655cca01aaf76a8c7fbd7fc0a7337d1b02ce5f8820283
5
5
  SHA512:
6
- metadata.gz: a0622168bf03b042da4d02f74e190efa93842879d9705a227616149f4ce7948e043cc45b2fe8f06ecbad7acf34950c19097acd3eaab9d2136375e3c7cfe1f2f2
7
- data.tar.gz: 37728413f92234f2e18d8f76480c7be571e58496303e8256ff9c0debf11d27cad843f750907676756a7ee30bbe43b988193fc96d5099e810fcac580a284749c7
6
+ metadata.gz: 682d15f462913f0e419957ba8f588de8a04830ce896450cbef3e8125e3bc699bf06b0adba55a0db52281b57adc4755b7c14e4ee670762211e735624546b58218
7
+ data.tar.gz: 107ae02bc28f9a46ee09908ec469ea8f1f59902fc99da8ec152d174a25058224efe300323824c71dad6c81c671e51cfa316bcc3f9e69d388128f55c8e636804b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 0.40.1
4
+
5
+ - Fix to support file names containing colons.
6
+
3
7
  ## 0.40.0
4
8
  - Change ci platform to Github Actions.
5
9
  - Fix regular expressions to detect group id(url_name) for group mention.
@@ -90,7 +90,8 @@ module Qiita
90
90
  end
91
91
 
92
92
  def sections
93
- @sections ||= (@text || "").split(":")
93
+ splited = (@text || "").split(":")
94
+ @sections ||= splited.length <= 2 ? splited : @text.split(":", 2)
94
95
  end
95
96
  end
96
97
  end
@@ -1,5 +1,5 @@
1
1
  module Qiita
2
2
  module Markdown
3
- VERSION = "0.40.0"
3
+ VERSION = "0.40.1"
4
4
  end
5
5
  end
@@ -156,6 +156,26 @@ describe Qiita::Markdown::Processor do
156
156
  end
157
157
  end
158
158
 
159
+ context "with code & filename with `:`" do
160
+ let(:markdown) do
161
+ <<-MARKDOWN.strip_heredoc
162
+ ```ruby:test:example.rb
163
+ 1
164
+ ```
165
+ MARKDOWN
166
+ end
167
+
168
+ it "returns code-frame, code-lang, and highlighted pre element" do
169
+ should eq <<-HTML.strip_heredoc
170
+ <div class="code-frame" data-lang="ruby">
171
+ <div class="code-lang"><span class="bold">test:example.rb</span></div>
172
+ <div class="highlight"><pre class="codehilite"><code><span class="mi">1</span>
173
+ </code></pre></div>
174
+ </div>
175
+ HTML
176
+ end
177
+ end
178
+
159
179
  context "with code & filename with .php" do
160
180
  let(:markdown) do
161
181
  <<-MARKDOWN.strip_heredoc
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.40.0
4
+ version: 0.40.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-06 00:00:00.000000000 Z
11
+ date: 2022-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gemoji
@@ -372,7 +372,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
372
372
  - !ruby/object:Gem::Version
373
373
  version: '0'
374
374
  requirements: []
375
- rubygems_version: 3.0.3
375
+ rubygems_version: 3.1.4
376
376
  signing_key:
377
377
  specification_version: 4
378
378
  summary: Qiita-specified markdown processor.