reveal-ck 3.8.0 → 3.8.1
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/Rakefile +2 -2
- data/bin/reveal-ck +21 -15
- data/features/step_definitions/html_match_steps.rb +1 -0
- data/features/step_definitions/serve_steps.rb +1 -1
- data/lib/reveal-ck/builders/slides_builder.rb +1 -0
- data/lib/reveal-ck/commands/listen_to_rebuild_slides.rb +1 -0
- data/lib/reveal-ck/commands/serve_ui.rb +1 -1
- data/lib/reveal-ck/config.rb +8 -8
- data/lib/reveal-ck/markdown/post_processor.rb +2 -0
- data/lib/reveal-ck/markdown/pre_processor_for_dividers.rb +3 -0
- data/lib/reveal-ck/presentation_dsl.rb +0 -2
- data/lib/reveal-ck/rake_task.rb +5 -5
- data/lib/reveal-ck/version.rb +1 -1
- data/rakelib/prepare_release.rake +4 -2
- data/rakelib/relish.rake +0 -1
- data/spec/lib/reveal-ck/markdown/post_processor_spec.rb +18 -18
- data/spec/lib/reveal-ck/markdown/pre_processor_spec.rb +36 -36
- data/spec/lib/reveal-ck/markdown/slide_markdown_template_spec.rb +14 -14
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71a1d84e87f7d90d983969acc461206956378fa6
|
4
|
+
data.tar.gz: 9e2c6a050d513145d664127bfeee4cb647ee1249
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c7e1a590ad149b22e7da4872e2bf3d349a4a283c5bffa0667246710a60012120db19c1bef759652b3b0479be981d835764082e5c887efcd1b9a0f6cde35e8cd
|
7
|
+
data.tar.gz: b2572cf14ccb8f3ec8efe10a520621a070e59b9aa2d86a6bacb57809cd35b85e4ba685d2ce08900975a757425d6325982ef0746574805675e8fb92f81aa68534
|
data/Rakefile
CHANGED
@@ -6,8 +6,8 @@ Bundler::GemHelper.install_tasks
|
|
6
6
|
begin
|
7
7
|
Bundler.setup(:default, :development)
|
8
8
|
rescue Bundler::BundlerError => e
|
9
|
-
|
10
|
-
|
9
|
+
warn e.message
|
10
|
+
warn 'Run `bundle install` to install missing gems'
|
11
11
|
exit e.status_code
|
12
12
|
end
|
13
13
|
|
data/bin/reveal-ck
CHANGED
@@ -2,6 +2,23 @@
|
|
2
2
|
require 'gli'
|
3
3
|
require 'reveal-ck'
|
4
4
|
|
5
|
+
def warn_and_exit_if_missing_slides_file(slides_file)
|
6
|
+
return unless slides_file.nil?
|
7
|
+
|
8
|
+
puts
|
9
|
+
puts 'Problem:'
|
10
|
+
puts
|
11
|
+
puts ' reveal-ck could not find a slides file, and it cannnot build'
|
12
|
+
puts ' your presentation without one.'
|
13
|
+
puts
|
14
|
+
puts ' It thinks anything that matches "slides.*" is a slides file.'
|
15
|
+
puts
|
16
|
+
puts ' Some examples are: slides.md, slides.html, slides.haml'
|
17
|
+
puts
|
18
|
+
msg = 'Create a file matching slides.* to proceed, such as slides.md.'
|
19
|
+
exit_now!(msg)
|
20
|
+
end
|
21
|
+
|
5
22
|
class RevealCKExecutable
|
6
23
|
extend GLI::App
|
7
24
|
extend RevealCK::Misc::RemoveExtension
|
@@ -21,20 +38,7 @@ class RevealCKExecutable
|
|
21
38
|
|
22
39
|
c.action do |_, options, _|
|
23
40
|
slides_file = options[:file]
|
24
|
-
|
25
|
-
puts
|
26
|
-
puts 'Problem:'
|
27
|
-
puts
|
28
|
-
puts ' reveal-ck could not find a slides file, and it cannnot build'
|
29
|
-
puts ' your presentation without one.'
|
30
|
-
puts
|
31
|
-
puts ' It thinks anything that matches "slides.*" is a slides file.'
|
32
|
-
puts
|
33
|
-
puts ' Some examples are: slides.md, slides.html, slides.haml'
|
34
|
-
puts
|
35
|
-
msg = 'Create a file matching slides.* to proceed, such as slides.md.'
|
36
|
-
exit_now!(msg)
|
37
|
-
end
|
41
|
+
warn_and_exit_if_missing_slides_file(slides_file)
|
38
42
|
slides_dir = options[:dir] || remove_extension(options[:file])
|
39
43
|
|
40
44
|
generate_args = {
|
@@ -66,6 +70,8 @@ class RevealCKExecutable
|
|
66
70
|
c.flag ['test-quit-after-starting'], type: Integer
|
67
71
|
|
68
72
|
c.action do |_, options, _|
|
73
|
+
slides_file = options[:file]
|
74
|
+
warn_and_exit_if_missing_slides_file(slides_file)
|
69
75
|
slides_dir = options[:dir] || remove_extension(options[:file])
|
70
76
|
serve_args = {
|
71
77
|
doc_root: slides_dir,
|
@@ -73,7 +79,7 @@ class RevealCKExecutable
|
|
73
79
|
output_dir: slides_dir,
|
74
80
|
port: options[:port],
|
75
81
|
host: options[:host],
|
76
|
-
slides_file:
|
82
|
+
slides_file: slides_file,
|
77
83
|
user_dir: Dir.pwd
|
78
84
|
}
|
79
85
|
if options['test-quit-after-starting']
|
@@ -11,6 +11,7 @@ end
|
|
11
11
|
def check_doc_matches(doc, selector, description, type)
|
12
12
|
search_result = doc.send(type, selector)
|
13
13
|
return unless search_result.empty?
|
14
|
+
|
14
15
|
message = "Could not find #{description}. "
|
15
16
|
message += "No match for #{type} '#{selector}'"
|
16
17
|
raise message
|
data/lib/reveal-ck/config.rb
CHANGED
@@ -27,15 +27,15 @@ module RevealCK
|
|
27
27
|
|
28
28
|
def core_defaults
|
29
29
|
{
|
30
|
-
'title'
|
31
|
-
'description'
|
32
|
-
'author'
|
33
|
-
'theme'
|
34
|
-
'transition'
|
35
|
-
'data'
|
30
|
+
'title' => 'Slides',
|
31
|
+
'description' => '',
|
32
|
+
'author' => '',
|
33
|
+
'theme' => 'black',
|
34
|
+
'transition' => 'default',
|
35
|
+
'data' => {},
|
36
36
|
'meta_properties' => {},
|
37
|
-
'meta_names'
|
38
|
-
'head_prefix'
|
37
|
+
'meta_names' => {},
|
38
|
+
'head_prefix' => OPEN_GRAPH_PREFIX
|
39
39
|
}
|
40
40
|
end
|
41
41
|
|
@@ -43,12 +43,14 @@ module RevealCK
|
|
43
43
|
def replace_if_start_with(old, new)
|
44
44
|
old = "#{old}\n"
|
45
45
|
return unless doc.start_with?(old)
|
46
|
+
|
46
47
|
@doc = doc[old.size, doc.size - 1]
|
47
48
|
@doc = "#{new}\n#{doc}"
|
48
49
|
end
|
49
50
|
|
50
51
|
def replace_if_end_with(old, new)
|
51
52
|
return unless doc.end_with? old
|
53
|
+
|
52
54
|
@doc = doc[0, doc.size - 1 - old.size]
|
53
55
|
@doc = "#{doc}\n#{new}\n"
|
54
56
|
end
|
@@ -20,17 +20,20 @@ module RevealCK
|
|
20
20
|
def add_first_slide_divider_if_needed
|
21
21
|
return if doc.start_with?(slide_divider)
|
22
22
|
return if doc.start_with?(slide_vertical)
|
23
|
+
|
23
24
|
prepend(slide_divider)
|
24
25
|
end
|
25
26
|
|
26
27
|
def add_last_slide_divider_if_needed
|
27
28
|
return if doc.end_with?(slide_divider)
|
28
29
|
return if doc.end_with?(slide_vertical)
|
30
|
+
|
29
31
|
append(slide_divider)
|
30
32
|
end
|
31
33
|
|
32
34
|
def add_last_slide_vertical_if_needed
|
33
35
|
return unless doc.scan(slide_vertical_regex).size.odd?
|
36
|
+
|
34
37
|
append(slide_vertical)
|
35
38
|
end
|
36
39
|
|
data/lib/reveal-ck/rake_task.rb
CHANGED
@@ -45,11 +45,11 @@ module RevealCK
|
|
45
45
|
puts "Generating slides for '#{file}'.." if verbose
|
46
46
|
|
47
47
|
slides_builder = RevealCK::Builders::SlidesBuilder.new(
|
48
|
-
user_dir:
|
49
|
-
gem_dir:
|
50
|
-
output_dir:
|
51
|
-
slides_file:
|
52
|
-
config:
|
48
|
+
user_dir: user_dir,
|
49
|
+
gem_dir: gem_dir,
|
50
|
+
output_dir: dir,
|
51
|
+
slides_file: file,
|
52
|
+
config: config
|
53
53
|
)
|
54
54
|
slides_builder.prepare
|
55
55
|
slides_builder.build
|
data/lib/reveal-ck/version.rb
CHANGED
@@ -39,8 +39,8 @@ def update_changelog(old_version, new_version, todays_date)
|
|
39
39
|
add_unreleased_preamble(new_version)
|
40
40
|
end
|
41
41
|
|
42
|
-
def echo(
|
43
|
-
puts "\n#{
|
42
|
+
def echo(str)
|
43
|
+
puts "\n#{str}\n"
|
44
44
|
end
|
45
45
|
|
46
46
|
def print_next_steps(new_version)
|
@@ -59,6 +59,8 @@ end
|
|
59
59
|
desc 'Prepare to Release'
|
60
60
|
task :prep_release do
|
61
61
|
new_version = ENV['NEW_VERSION']
|
62
|
+
raise 'Need to set env NEW_VERSION' unless new_version
|
63
|
+
|
62
64
|
todays_date = Time.now.strftime('%Y-%m-%d')
|
63
65
|
update_version_rb(new_version)
|
64
66
|
update_gemspec(todays_date)
|
data/rakelib/relish.rake
CHANGED
@@ -19,7 +19,7 @@ module RevealCK
|
|
19
19
|
|
20
20
|
context 'handling notes' do
|
21
21
|
let :transformed_notes do
|
22
|
-
<<-
|
22
|
+
<<-HTML.strip_heredoc
|
23
23
|
<div>DIVIDER</div>
|
24
24
|
|
25
25
|
|
@@ -31,7 +31,7 @@ module RevealCK
|
|
31
31
|
|
32
32
|
|
33
33
|
<div>DIVIDER</div>
|
34
|
-
|
34
|
+
HTML
|
35
35
|
end
|
36
36
|
|
37
37
|
it 'translates <div>NOTES_OPEN</div> into <aside class="notes">' do
|
@@ -47,7 +47,7 @@ module RevealCK
|
|
47
47
|
|
48
48
|
context 'without vertical slides' do
|
49
49
|
let :three_slide_input do
|
50
|
-
<<-
|
50
|
+
<<-HTML.strip_heredoc
|
51
51
|
<div>DIVIDER</div>
|
52
52
|
|
53
53
|
<p>First</p>
|
@@ -61,11 +61,11 @@ module RevealCK
|
|
61
61
|
<p>Third</p>
|
62
62
|
|
63
63
|
<div>DIVIDER</div>
|
64
|
-
|
64
|
+
HTML
|
65
65
|
end
|
66
66
|
|
67
67
|
let :three_slides_output do
|
68
|
-
<<-
|
68
|
+
<<-HTML.strip_heredoc
|
69
69
|
<section>
|
70
70
|
|
71
71
|
<p>First</p>
|
@@ -81,7 +81,7 @@ module RevealCK
|
|
81
81
|
<p>Third</p>
|
82
82
|
|
83
83
|
</section>
|
84
|
-
|
84
|
+
HTML
|
85
85
|
end
|
86
86
|
|
87
87
|
it 'starts the output with a <section> and a newline' do
|
@@ -103,7 +103,7 @@ module RevealCK
|
|
103
103
|
context 'with vertical slides' do
|
104
104
|
context 'single vertical slide' do
|
105
105
|
let :single_vertical_input do
|
106
|
-
<<-
|
106
|
+
<<-HTML.strip_heredoc
|
107
107
|
<div>VERTICAL_START</div>
|
108
108
|
|
109
109
|
First
|
@@ -117,11 +117,11 @@ module RevealCK
|
|
117
117
|
Third
|
118
118
|
|
119
119
|
<div>VERTICAL_END</div>
|
120
|
-
|
120
|
+
HTML
|
121
121
|
end
|
122
122
|
|
123
123
|
let :single_vertical_output do
|
124
|
-
<<-
|
124
|
+
<<-HTML.strip_heredoc
|
125
125
|
<section>
|
126
126
|
<section>
|
127
127
|
|
@@ -139,7 +139,7 @@ module RevealCK
|
|
139
139
|
|
140
140
|
</section>
|
141
141
|
</section>
|
142
|
-
|
142
|
+
HTML
|
143
143
|
end
|
144
144
|
|
145
145
|
it 'starts the output with two <section>s' do
|
@@ -160,7 +160,7 @@ module RevealCK
|
|
160
160
|
|
161
161
|
context 'back-to-back vertical slides' do
|
162
162
|
let :double_vertical_input do
|
163
|
-
<<-
|
163
|
+
<<-HTML.strip_heredoc
|
164
164
|
<div>VERTICAL_START</div>
|
165
165
|
|
166
166
|
Vertical A1
|
@@ -189,11 +189,11 @@ module RevealCK
|
|
189
189
|
Vertical B3
|
190
190
|
|
191
191
|
<div>VERTICAL_END</div>
|
192
|
-
|
192
|
+
HTML
|
193
193
|
end
|
194
194
|
|
195
195
|
let :double_vertical_output do
|
196
|
-
<<-
|
196
|
+
<<-HTML.strip_heredoc
|
197
197
|
<section>
|
198
198
|
<section>
|
199
199
|
|
@@ -229,7 +229,7 @@ module RevealCK
|
|
229
229
|
|
230
230
|
</section>
|
231
231
|
</section>
|
232
|
-
|
232
|
+
HTML
|
233
233
|
end
|
234
234
|
|
235
235
|
it 'creates two columns of sections' do
|
@@ -240,7 +240,7 @@ module RevealCK
|
|
240
240
|
|
241
241
|
context 'horizontal and vertical combinations' do
|
242
242
|
let :verticals_surrounded_by_horizontals_input do
|
243
|
-
<<-
|
243
|
+
<<-HTML.strip_heredoc
|
244
244
|
<div>DIVIDER</div>
|
245
245
|
|
246
246
|
First
|
@@ -278,11 +278,11 @@ module RevealCK
|
|
278
278
|
Last
|
279
279
|
|
280
280
|
<div>DIVIDER</div>
|
281
|
-
|
281
|
+
HTML
|
282
282
|
end
|
283
283
|
|
284
284
|
let :verticals_surrounded_by_horizontals_output do
|
285
|
-
<<-
|
285
|
+
<<-HTML.strip_heredoc
|
286
286
|
<section>
|
287
287
|
|
288
288
|
First
|
@@ -332,7 +332,7 @@ module RevealCK
|
|
332
332
|
Last
|
333
333
|
|
334
334
|
</section>
|
335
|
-
|
335
|
+
HTML
|
336
336
|
end
|
337
337
|
|
338
338
|
it 'creates a slide, a column, a slide, a column, and a slide' do
|
@@ -5,23 +5,23 @@ module RevealCK
|
|
5
5
|
describe PreProcessor do
|
6
6
|
describe 'handling ```notes' do
|
7
7
|
let :notes_input do
|
8
|
-
<<-
|
8
|
+
<<-SLIDES.strip_heredoc
|
9
9
|
```notes
|
10
10
|
This is a note
|
11
11
|
```
|
12
|
-
|
12
|
+
SLIDES
|
13
13
|
end
|
14
14
|
|
15
15
|
let :note_input do
|
16
|
-
<<-
|
16
|
+
<<-SLIDES.strip_heredoc
|
17
17
|
```note
|
18
18
|
This is a note
|
19
19
|
```
|
20
|
-
|
20
|
+
SLIDES
|
21
21
|
end
|
22
22
|
|
23
23
|
let :transformed_notes do
|
24
|
-
<<-
|
24
|
+
<<-HTML.strip_heredoc
|
25
25
|
<div>DIVIDER</div>
|
26
26
|
|
27
27
|
|
@@ -33,7 +33,7 @@ module RevealCK
|
|
33
33
|
|
34
34
|
|
35
35
|
<div>DIVIDER</div>
|
36
|
-
|
36
|
+
HTML
|
37
37
|
end
|
38
38
|
|
39
39
|
it 'transforms ```notes into <div>NOTES_OPEN</div>' do
|
@@ -72,13 +72,13 @@ module RevealCK
|
|
72
72
|
end
|
73
73
|
|
74
74
|
let :standard_result do
|
75
|
-
<<-
|
75
|
+
<<-HTML.strip_heredoc
|
76
76
|
<div>DIVIDER</div>
|
77
77
|
|
78
78
|
First
|
79
79
|
|
80
80
|
<div>DIVIDER</div>
|
81
|
-
|
81
|
+
HTML
|
82
82
|
end
|
83
83
|
|
84
84
|
context 'without vertical slides' do
|
@@ -89,45 +89,45 @@ module RevealCK
|
|
89
89
|
end
|
90
90
|
|
91
91
|
it 'is consistent when starting+ending separators are used' do
|
92
|
-
input = <<-
|
92
|
+
input = <<-SLIDES.strip_heredoc
|
93
93
|
---
|
94
94
|
First
|
95
95
|
---
|
96
|
-
|
96
|
+
SLIDES
|
97
97
|
output = PreProcessor.new(input).process
|
98
98
|
expect(output).to eq standard_result
|
99
99
|
end
|
100
100
|
|
101
101
|
it 'is consistent when only starting separators are used' do
|
102
|
-
input = <<-
|
102
|
+
input = <<-SLIDES.strip_heredoc
|
103
103
|
---
|
104
104
|
First
|
105
|
-
|
105
|
+
SLIDES
|
106
106
|
output = PreProcessor.new(input).process
|
107
107
|
expect(output).to eq standard_result
|
108
108
|
end
|
109
109
|
|
110
110
|
it 'is consistent when only ending separators are used' do
|
111
|
-
input = <<-
|
111
|
+
input = <<-SLIDES.strip_heredoc
|
112
112
|
First
|
113
113
|
---
|
114
|
-
|
114
|
+
SLIDES
|
115
115
|
output = PreProcessor.new(input).process
|
116
116
|
expect(output).to eq standard_result
|
117
117
|
end
|
118
118
|
|
119
119
|
let :three_slides_input do
|
120
|
-
<<-
|
120
|
+
<<-SLIDES.strip_heredoc
|
121
121
|
First
|
122
122
|
---
|
123
123
|
Second
|
124
124
|
---
|
125
125
|
Third
|
126
|
-
|
126
|
+
SLIDES
|
127
127
|
end
|
128
128
|
|
129
129
|
let :three_slides_output do
|
130
|
-
<<-
|
130
|
+
<<-HTML.strip_heredoc
|
131
131
|
<div>DIVIDER</div>
|
132
132
|
|
133
133
|
First
|
@@ -141,7 +141,7 @@ module RevealCK
|
|
141
141
|
Third
|
142
142
|
|
143
143
|
<div>DIVIDER</div>
|
144
|
-
|
144
|
+
HTML
|
145
145
|
end
|
146
146
|
|
147
147
|
it 'can handle three slides' do
|
@@ -153,7 +153,7 @@ module RevealCK
|
|
153
153
|
|
154
154
|
context 'with vertical slides' do
|
155
155
|
let :single_vertical_output do
|
156
|
-
<<-
|
156
|
+
<<-HTML.strip_heredoc
|
157
157
|
<div>VERTICAL_START</div>
|
158
158
|
|
159
159
|
First
|
@@ -167,25 +167,25 @@ module RevealCK
|
|
167
167
|
Third
|
168
168
|
|
169
169
|
<div>VERTICAL_END</div>
|
170
|
-
|
170
|
+
HTML
|
171
171
|
end
|
172
172
|
|
173
173
|
context 'single vertical slide' do
|
174
174
|
it 'handles situation with no "closing" vertical' do
|
175
|
-
unbalanced_vertical_markdown = <<-
|
175
|
+
unbalanced_vertical_markdown = <<-SLIDES.strip_heredoc
|
176
176
|
***
|
177
177
|
First
|
178
178
|
---
|
179
179
|
Second
|
180
180
|
---
|
181
181
|
Third
|
182
|
-
|
182
|
+
SLIDES
|
183
183
|
output = PreProcessor.new(unbalanced_vertical_markdown).process
|
184
184
|
expect(output).to eq single_vertical_output
|
185
185
|
end
|
186
186
|
|
187
187
|
it 'handles situation with a "closing" vertical' do
|
188
|
-
balanced_vertical_markdown = <<-
|
188
|
+
balanced_vertical_markdown = <<-SLIDES.strip_heredoc
|
189
189
|
***
|
190
190
|
First
|
191
191
|
---
|
@@ -193,7 +193,7 @@ module RevealCK
|
|
193
193
|
---
|
194
194
|
Third
|
195
195
|
***
|
196
|
-
|
196
|
+
SLIDES
|
197
197
|
|
198
198
|
output = PreProcessor.new(balanced_vertical_markdown).process
|
199
199
|
expect(output).to eq single_vertical_output
|
@@ -202,7 +202,7 @@ module RevealCK
|
|
202
202
|
|
203
203
|
context 'horizontal and vertical combinations' do
|
204
204
|
it 'handles vertical slides surrounded by horizontals' do
|
205
|
-
vertical_surrounded_by_horizontal = <<-
|
205
|
+
vertical_surrounded_by_horizontal = <<-SLIDES.strip_heredoc
|
206
206
|
First
|
207
207
|
***
|
208
208
|
Vertical 1
|
@@ -212,9 +212,9 @@ module RevealCK
|
|
212
212
|
Vertical 3
|
213
213
|
***
|
214
214
|
Last
|
215
|
-
|
215
|
+
SLIDES
|
216
216
|
output = PreProcessor.new(vertical_surrounded_by_horizontal).process
|
217
|
-
expect(output).to eq <<-
|
217
|
+
expect(output).to eq <<-HTML.strip_heredoc
|
218
218
|
<div>DIVIDER</div>
|
219
219
|
|
220
220
|
First
|
@@ -236,11 +236,11 @@ module RevealCK
|
|
236
236
|
Last
|
237
237
|
|
238
238
|
<div>DIVIDER</div>
|
239
|
-
|
239
|
+
HTML
|
240
240
|
end
|
241
241
|
|
242
242
|
it 'handles back-to-back vertical slides surrounded by horizontals' do
|
243
|
-
vertical_surrounded_by_horizontal = <<-
|
243
|
+
vertical_surrounded_by_horizontal = <<-SLIDES.strip_heredoc
|
244
244
|
First
|
245
245
|
***
|
246
246
|
Vertical A1
|
@@ -257,9 +257,9 @@ module RevealCK
|
|
257
257
|
Vertical B3
|
258
258
|
***
|
259
259
|
Last
|
260
|
-
|
260
|
+
SLIDES
|
261
261
|
output = PreProcessor.new(vertical_surrounded_by_horizontal).process
|
262
|
-
expect(output).to eq <<-
|
262
|
+
expect(output).to eq <<-HTML.strip_heredoc
|
263
263
|
<div>DIVIDER</div>
|
264
264
|
|
265
265
|
First
|
@@ -296,11 +296,11 @@ module RevealCK
|
|
296
296
|
Last
|
297
297
|
|
298
298
|
<div>DIVIDER</div>
|
299
|
-
|
299
|
+
HTML
|
300
300
|
end
|
301
301
|
|
302
302
|
it 'handles multiple vertical slides surrounded by horizontals' do
|
303
|
-
vertical_surrounded_by_horizontal = <<-
|
303
|
+
vertical_surrounded_by_horizontal = <<-SLIDES.strip_heredoc
|
304
304
|
First
|
305
305
|
***
|
306
306
|
Vertical A1
|
@@ -318,9 +318,9 @@ module RevealCK
|
|
318
318
|
Vertical B3
|
319
319
|
***
|
320
320
|
Last
|
321
|
-
|
321
|
+
SLIDES
|
322
322
|
output = PreProcessor.new(vertical_surrounded_by_horizontal).process
|
323
|
-
expect(output).to eq <<-
|
323
|
+
expect(output).to eq <<-HTML.strip_heredoc
|
324
324
|
<div>DIVIDER</div>
|
325
325
|
|
326
326
|
First
|
@@ -358,7 +358,7 @@ module RevealCK
|
|
358
358
|
Last
|
359
359
|
|
360
360
|
<div>DIVIDER</div>
|
361
|
-
|
361
|
+
HTML
|
362
362
|
end
|
363
363
|
end
|
364
364
|
end
|
@@ -14,71 +14,71 @@ module RevealCK
|
|
14
14
|
end
|
15
15
|
|
16
16
|
it 'does not turn _s within a single emoji into <em>s' do
|
17
|
-
output = render_markdown <<-
|
17
|
+
output = render_markdown <<-SLIDES.strip_heredoc
|
18
18
|
:money_with_wings:
|
19
|
-
|
19
|
+
SLIDES
|
20
20
|
expect(output).to include ':money_with_wings:'
|
21
21
|
end
|
22
22
|
|
23
23
|
it 'does not turn _s between two emojis into <em>s' do
|
24
|
-
output = render_markdown <<-
|
24
|
+
output = render_markdown <<-SLIDES.strip_heredoc
|
25
25
|
:blue_heart: :blue_heart:
|
26
|
-
|
26
|
+
SLIDES
|
27
27
|
expect(output).to include ':blue_heart: :blue_heart:'
|
28
28
|
end
|
29
29
|
|
30
30
|
it 'uses "---" to create "<section>"s' do
|
31
|
-
output = render_markdown <<-
|
31
|
+
output = render_markdown <<-SLIDES.strip_heredoc
|
32
32
|
# h1 Slide
|
33
33
|
---
|
34
34
|
## h2 Slide
|
35
|
-
|
35
|
+
SLIDES
|
36
36
|
expect(output).to include '<h1>h1 Slide</h1>'
|
37
37
|
expect(output).to include "</section>\n<section>"
|
38
38
|
expect(output).to include '<h2>h2 Slide</h2>'
|
39
39
|
end
|
40
40
|
|
41
41
|
it 'wraps ``` code in a <pre> and <code>' do
|
42
|
-
output = render_markdown <<-
|
42
|
+
output = render_markdown <<-SLIDES.strip_heredoc
|
43
43
|
```
|
44
44
|
def adder(a, b); a + b; end
|
45
45
|
```
|
46
|
-
|
46
|
+
SLIDES
|
47
47
|
expect(output).to include '<pre><code>'
|
48
48
|
expect(output).to include '</code></pre>'
|
49
49
|
expect(output).to include 'a + b'
|
50
50
|
end
|
51
51
|
|
52
52
|
it 'converts special characters in ``` block to entity references' do
|
53
|
-
output = render_markdown <<-
|
53
|
+
output = render_markdown <<-SLIDES.strip_heredoc
|
54
54
|
```
|
55
55
|
<p>"&"</p>
|
56
56
|
```
|
57
|
-
|
57
|
+
SLIDES
|
58
58
|
expect(output).to include '<pre><code>'
|
59
59
|
expect(output).to include '</code></pre>'
|
60
60
|
expect(output).to include '<p>"&"</p>'
|
61
61
|
end
|
62
62
|
|
63
63
|
it 'wraps ```ruby code in a <pre> and <code class="language-ruby">' do
|
64
|
-
output = render_markdown <<-
|
64
|
+
output = render_markdown <<-SLIDES.strip_heredoc
|
65
65
|
```ruby
|
66
66
|
def adder(a, b); a + b; end
|
67
67
|
```
|
68
|
-
|
68
|
+
SLIDES
|
69
69
|
expect(output).to include '<pre><code class="language-ruby">'
|
70
70
|
expect(output).to include '</code></pre>'
|
71
71
|
expect(output).to include 'a + b'
|
72
72
|
end
|
73
73
|
|
74
74
|
it 'works when there is no space surrounding the ---' do
|
75
|
-
output = render_markdown <<-
|
75
|
+
output = render_markdown <<-SLIDES.strip_heredoc
|
76
76
|
# Your headline
|
77
77
|
* Bullet 1
|
78
78
|
* Bullet 2
|
79
79
|
---
|
80
80
|
# Next Slide
|
81
|
-
|
81
|
+
SLIDES
|
82
82
|
expect(output).to include "</section>\n<section>"
|
83
83
|
end
|
84
84
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reveal-ck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.8.
|
4
|
+
version: 3.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jed Northridge
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docile
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - '='
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 2.0.
|
145
|
+
version: 2.0.6
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - '='
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 2.0.
|
152
|
+
version: 2.0.6
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rack-livereload
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -207,33 +207,33 @@ dependencies:
|
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: 3.0.7
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
|
-
name:
|
210
|
+
name: thor
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
213
|
- - '='
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version:
|
215
|
+
version: 0.19.1
|
216
216
|
type: :runtime
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
220
|
- - '='
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version:
|
222
|
+
version: 0.19.1
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
|
-
name:
|
224
|
+
name: tilt
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
226
226
|
requirements:
|
227
227
|
- - '='
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version: 0.
|
229
|
+
version: 2.0.5
|
230
230
|
type: :runtime
|
231
231
|
prerelease: false
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
234
|
- - '='
|
235
235
|
- !ruby/object:Gem::Version
|
236
|
-
version: 0.
|
236
|
+
version: 2.0.5
|
237
237
|
- !ruby/object:Gem::Dependency
|
238
238
|
name: activesupport
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|
@@ -336,16 +336,16 @@ dependencies:
|
|
336
336
|
name: rubocop
|
337
337
|
requirement: !ruby/object:Gem::Requirement
|
338
338
|
requirements:
|
339
|
-
- - "
|
339
|
+
- - "~>"
|
340
340
|
- !ruby/object:Gem::Version
|
341
|
-
version: '0'
|
341
|
+
version: '0.60'
|
342
342
|
type: :development
|
343
343
|
prerelease: false
|
344
344
|
version_requirements: !ruby/object:Gem::Requirement
|
345
345
|
requirements:
|
346
|
-
- - "
|
346
|
+
- - "~>"
|
347
347
|
- !ruby/object:Gem::Version
|
348
|
-
version: '0'
|
348
|
+
version: '0.60'
|
349
349
|
- !ruby/object:Gem::Dependency
|
350
350
|
name: simplecov
|
351
351
|
requirement: !ruby/object:Gem::Requirement
|