qiita-markdown 0.11.4 → 0.11.5

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.

Potentially problematic release.


This version of qiita-markdown might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f99760b999b79c96dadab8887226d3346ab47234
4
- data.tar.gz: e58755243c91886a506f4726cb0b5310bb0c2549
3
+ metadata.gz: ec6145ad1c4a81c4e3cb46c2d3e6c86e8051ff7b
4
+ data.tar.gz: 0ac6fc03d26838c7c80ca7a347c17002b33d634d
5
5
  SHA512:
6
- metadata.gz: 28485fbec44342c438da399782057bc7dad82e3a3ce93676b9ba873ab2b131eaa7d21b693dd78495ec5b4b64ef06a10b210323db8d784bbf73c3349d58d9d35b
7
- data.tar.gz: fae7eed6ec23f355735f8e251f49fc40c4a309b3211fef020944294b8299e7d43f2589f34d1d63349761d3202ed80e9dc116461cd016350f9fff8360f91fb828
6
+ metadata.gz: f81cedd31daa8953dc2514511660f8f55af54acd1ffefefd306a211d4dc102b260f04c9371de7df1a3c6939281efc9fbadbd78308489474ce770ed54ed2d248d
7
+ data.tar.gz: 3a31ff0761eb73c05b9c5be2951265d91790989a9ac3b3033a4321a7cdcf980d0e1df954e65268a1bdcdd4e21bbad8bf61849b082a030787dce31a136f12e0bb
data/.gitignore CHANGED
@@ -5,6 +5,7 @@
5
5
  /coverage/
6
6
  /doc/
7
7
  /pkg/
8
+ /spec/examples.txt
8
9
  /spec/reports/
9
10
  /tmp/
10
11
  *.bundle
@@ -1,3 +1,6 @@
1
+ ## 0.11.5
2
+ - Add a leading newline to `<pre>` elements so that leading newlines inputted by user are properly rendered on browsers
3
+
1
4
  ## 0.11.4
2
5
  - Avoid stripping leading and trailing newlines in code snippets
3
6
 
@@ -28,6 +28,9 @@ module Qiita
28
28
  filename: filename,
29
29
  language: language,
30
30
  }
31
+ # a leading newline character immediately following the pre element start tag is stripped.
32
+ # http://dev.w3.org/html5/spec-preview/the-pre-element.html
33
+ pre.content = "\n#{pre.content}"
31
34
  end
32
35
  end
33
36
  doc
@@ -1,5 +1,5 @@
1
1
  module Qiita
2
2
  module Markdown
3
- VERSION = "0.11.4"
3
+ VERSION = "0.11.5"
4
4
  end
5
5
  end
@@ -117,7 +117,8 @@ describe Qiita::Markdown::Processor do
117
117
  should eq <<-EOS.strip_heredoc
118
118
  <div class="code-frame" data-lang="ruby">
119
119
  <div class="code-lang"><span class="bold">example.rb</span></div>
120
- <div class="highlight"><pre><span class="mi">1</span>
120
+ <div class="highlight"><pre>
121
+ <span class="mi">1</span>
121
122
  </pre></div>
122
123
  </div>
123
124
  EOS
@@ -137,7 +138,8 @@ describe Qiita::Markdown::Processor do
137
138
  should eq <<-EOS.strip_heredoc
138
139
  <div class="code-frame" data-lang="php">
139
140
  <div class="code-lang"><span class="bold">example.php</span></div>
140
- <div class="highlight"><pre><span class="mi">1</span>
141
+ <div class="highlight"><pre>
142
+ <span class="mi">1</span>
141
143
  </pre></div>
142
144
  </div>
143
145
  EOS
@@ -157,7 +159,8 @@ describe Qiita::Markdown::Processor do
157
159
  should eq <<-EOS.strip_heredoc
158
160
  <div class="code-frame" data-lang="js">
159
161
  <div class="code-lang"><span class="bold">test</span></div>
160
- <div class="highlight"><pre><span class="mi">1</span>
162
+ <div class="highlight"><pre>
163
+ <span class="mi">1</span>
161
164
  </pre></div>
162
165
  </div>
163
166
  EOS
@@ -175,7 +178,8 @@ describe Qiita::Markdown::Processor do
175
178
 
176
179
  it "returns code-frame and highlighted pre element" do
177
180
  should eq <<-EOS.strip_heredoc
178
- <div class="code-frame" data-lang="ruby"><div class="highlight"><pre><span class="mi">1</span>
181
+ <div class="code-frame" data-lang="ruby"><div class="highlight"><pre>
182
+ <span class="mi">1</span>
179
183
  </pre></div></div>
180
184
  EOS
181
185
  end
@@ -215,6 +219,7 @@ describe Qiita::Markdown::Processor do
215
219
  it "does not strip the newlines" do
216
220
  should eq <<-EOS.strip_heredoc
217
221
  <div class="code-frame" data-lang="text"><div class="highlight"><pre>
222
+
218
223
  foo
219
224
 
220
225
  </pre></div></div>
@@ -359,7 +364,8 @@ describe Qiita::Markdown::Processor do
359
364
  should include(<<-EOS.strip_heredoc.rstrip)
360
365
  <div class="code-frame" data-lang="ruby">
361
366
  <div class="code-lang"><span class="bold">@alice</span></div>
362
- <div class="highlight"><pre><span class="mi">1</span>
367
+ <div class="highlight"><pre>
368
+ <span class="mi">1</span>
363
369
  </pre></div>
364
370
  </div>
365
371
  EOS
@@ -623,7 +629,8 @@ describe Qiita::Markdown::Processor do
623
629
 
624
630
  it "does not replace checkbox" do
625
631
  should eq <<-EOS.strip_heredoc
626
- <div class="code-frame" data-lang="text"><div class="highlight"><pre>- [ ] a
632
+ <div class="code-frame" data-lang="text"><div class="highlight"><pre>
633
+ - [ ] a
627
634
  - [x] b
628
635
  </pre></div></div>
629
636
  EOS
@@ -17,4 +17,6 @@ RSpec.configure do |config|
17
17
  config.default_formatter = "doc"
18
18
  config.filter_run :focus
19
19
  config.run_all_when_everything_filtered = true
20
+
21
+ config.example_status_persistence_file_path = "spec/examples.txt"
20
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qiita-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.4
4
+ version: 0.11.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura