downterm 0.1.4 → 0.1.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.
- checksums.yaml +4 -4
- data/lib/downterm/render.rb +4 -1
- data/lib/downterm/version.rb +1 -1
- data/spec/downterm/render_spec.rb +13 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f57169d5d1010e957945258e50383cbf0f08529
|
4
|
+
data.tar.gz: d2ca410f5e6ba9be8d1e7bd59738975f59c93f45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cee82808d06e2e84417391bddb91135050e3bfe2d818d5c5e2708c03e671809821f6276a4d1165cd7424fe6f65ad7cd62f3f696f08e52b7c8710baaec3a51441
|
7
|
+
data.tar.gz: 1208ae864f6be1f70faa8da92e627e5d072b34516b6f53556dac30cc4965a40c5874cedce6145b6d95eb088c29af2be21f1ac8bef9b73321466df89a3f23b0e9
|
data/lib/downterm/render.rb
CHANGED
@@ -69,7 +69,10 @@ module Downterm
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def block_quote(quote)
|
72
|
-
|
72
|
+
trimmed_quote = %Q{"#{quote.rstrip}"}
|
73
|
+
trailing_whitespace = quote[quote.rstrip.length..-1]
|
74
|
+
q = trimmed_quote.split("\n").map { |line| " #{line}" }.join("\n")
|
75
|
+
"#{q}#{trailing_whitespace}"
|
73
76
|
end
|
74
77
|
|
75
78
|
def block_html(raw_html)
|
data/lib/downterm/version.rb
CHANGED
@@ -191,7 +191,7 @@ module Downterm
|
|
191
191
|
end
|
192
192
|
|
193
193
|
describe 'a quote' do
|
194
|
-
it 'is
|
194
|
+
it 'is indented and placed within quotes' do
|
195
195
|
md = [
|
196
196
|
'This is a cool quote:',
|
197
197
|
'',
|
@@ -199,8 +199,19 @@ module Downterm
|
|
199
199
|
'> The vorpal blade went snicker-snack!',
|
200
200
|
'> He left it dead, and with its head',
|
201
201
|
'> He went galumphing back',
|
202
|
+
'',
|
203
|
+
'It is from Alice in Wonderland.',
|
202
204
|
].join("\n")
|
203
|
-
expected =
|
205
|
+
expected = <<-EOS.strip
|
206
|
+
This is a cool quote:
|
207
|
+
|
208
|
+
"One, two! One, two! And through and through
|
209
|
+
The vorpal blade went snicker-snack!
|
210
|
+
He left it dead, and with its head
|
211
|
+
He went galumphing back"
|
212
|
+
|
213
|
+
It is from Alice in Wonderland.
|
214
|
+
EOS
|
204
215
|
actual = markdown.render(md)
|
205
216
|
expect(actual).to eq(expected)
|
206
217
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: downterm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Dippery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rainbow
|
@@ -87,9 +87,9 @@ homepage: https://github.com/mdippery/downterm
|
|
87
87
|
licenses:
|
88
88
|
- MIT
|
89
89
|
metadata:
|
90
|
-
build_date:
|
91
|
-
commit: v0.1.
|
92
|
-
commit_hash:
|
90
|
+
build_date: 2016-05-03 23:47:18 PDT
|
91
|
+
commit: v0.1.5
|
92
|
+
commit_hash: e8f5230ef9e955e85238b0aae37c023cb2242e81
|
93
93
|
post_install_message:
|
94
94
|
rdoc_options: []
|
95
95
|
require_paths:
|