asciidoctor-revealjs 5.0.1 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -223,12 +223,18 @@ hljs.highlightAll();
223
223
  var highlightSteps = RevealHighlight.deserializeHighlightSteps( block.getAttribute( 'data-line-numbers' ) );
224
224
  if( highlightSteps.length > 1 ) {
225
225
 
226
+ // When rendered with asciidoc, data-fragment index if it exists lies on the listing block element, so we have to lookup
226
227
  // If the original code block has a fragment-index,
227
228
  // each clone should follow in an incremental sequence
228
- var fragmentIndex = parseInt( block.getAttribute( 'data-fragment-index' ), 10 );
229
+ var preCodeWrapper = block.parentElement;
230
+ var divContent = preCodeWrapper.parentElement;
231
+ var listingBlock = divContent.parentElement;
232
+ var fragmentIndex = parseInt( listingBlock.getAttribute( 'data-fragment-index' ), 10 );
229
233
 
230
234
  if( typeof fragmentIndex !== 'number' || isNaN( fragmentIndex ) ) {
231
235
  fragmentIndex = null;
236
+ } else {
237
+ fragmentIndex += 1;
232
238
  }
233
239
 
234
240
  // Generate fragments for all steps except the original block
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module Revealjs
3
- VERSION = '5.0.1'
3
+ VERSION = '5.2.0'
4
4
  end
5
5
  end
@@ -1,4 +1,4 @@
1
- = html_tag('div', { :id => @id, :class => ['colist', @style, role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes)))
1
+ = html_tag('div', { :id => @id, :class => ['colist', @style, role] }.merge(data_attrs(@attributes)))
2
2
  - if title?
3
3
  .title=title
4
4
  - if @document.attr? :icons
@@ -6,7 +6,7 @@
6
6
  table
7
7
  - items.each_with_index do |item, i|
8
8
  - num = i + 1
9
- tr
9
+ tr class=('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step'))
10
10
  td
11
11
  - if font_icons
12
12
  i.conum data-value=num
@@ -17,4 +17,5 @@
17
17
  - else
18
18
  ol
19
19
  - items.each do |item|
20
- li: p=item.text
20
+ li class=('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step'))
21
+ p=item.text
@@ -49,6 +49,7 @@
49
49
  - content_for :section
50
50
  section(id=(titleless ? nil : id)
51
51
  class=roles
52
+ data-background-gradient=(attr "background-gradient")
52
53
  data-transition=(attr 'transition')
53
54
  data-transition-speed=(attr 'transition-speed')
54
55
  data-background-color=data_background_color
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-revealjs
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Bilodeau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-24 00:00:00.000000000 Z
11
+ date: 2024-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -50,14 +50,20 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '5.14'
53
+ version: 5.24.0
54
+ - - "<"
55
+ - !ruby/object:Gem::Version
56
+ version: '5.25'
54
57
  type: :development
55
58
  prerelease: false
56
59
  version_requirements: !ruby/object:Gem::Requirement
57
60
  requirements:
58
61
  - - "~>"
59
62
  - !ruby/object:Gem::Version
60
- version: '5.14'
63
+ version: 5.24.0
64
+ - - "<"
65
+ - !ruby/object:Gem::Version
66
+ version: '5.25'
61
67
  - !ruby/object:Gem::Dependency
62
68
  name: pry
63
69
  requirement: !ruby/object:Gem::Requirement
@@ -134,14 +140,14 @@ dependencies:
134
140
  requirements:
135
141
  - - "~>"
136
142
  - !ruby/object:Gem::Version
137
- version: 0.6.0
143
+ version: 0.7.0
138
144
  type: :development
139
145
  prerelease: false
140
146
  version_requirements: !ruby/object:Gem::Requirement
141
147
  requirements:
142
148
  - - "~>"
143
149
  - !ruby/object:Gem::Version
144
- version: 0.6.0
150
+ version: 0.7.0
145
151
  - !ruby/object:Gem::Dependency
146
152
  name: slim
147
153
  requirement: !ruby/object:Gem::Requirement
@@ -258,6 +264,9 @@ files:
258
264
  - examples/release-4.0.css
259
265
  - examples/release-4.1.adoc
260
266
  - examples/release-4.1.css
267
+ - examples/release-5.1.adoc
268
+ - examples/release-5.1.css
269
+ - examples/release-5.2.adoc
261
270
  - examples/revealjs-custom-theme.adoc
262
271
  - examples/revealjs-plugin-activation.adoc
263
272
  - examples/revealjs-plugins-docinfo-footer.html