asciidoctor-revealjs 5.1.0 → 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.1.0'
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
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.1.0
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-12-12 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
@@ -260,6 +266,7 @@ files:
260
266
  - examples/release-4.1.css
261
267
  - examples/release-5.1.adoc
262
268
  - examples/release-5.1.css
269
+ - examples/release-5.2.adoc
263
270
  - examples/revealjs-custom-theme.adoc
264
271
  - examples/revealjs-plugin-activation.adoc
265
272
  - examples/revealjs-plugins-docinfo-footer.html