asciidoctor-tabs 1.0.0.beta.5 → 1.0.0.beta.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 917cc515ced6b0c7599132ddab2d1f72da09b6af4bf7e62774fed3be43363377
4
- data.tar.gz: f72d696d910cd046e05acdec439da2f2d407088e2972bbc2a5259049cd3626a0
3
+ metadata.gz: d453d4bfdf6f6b92e7a098908890fb85643aaee9d4fde38bd94aeae1f9576139
4
+ data.tar.gz: 7a6d50452588a2785e201fd76aa7cd6b61294f507456ad10aeb2fab76e97b1fc
5
5
  SHA512:
6
- metadata.gz: 500f6ee93e370b09e404531abad5d9fae5eea8cbb81ea1bf3b5a5c599dac1a48c961922fe88b9260bf8cf5a536e2db91378314433b5c35eeefff348016313f40
7
- data.tar.gz: e0c6683a932a88629d79d72b38bc3c9ff0fd8ac7446a16d264e7579b13b91ebfd83032ab1193e4c389b649c418b680d5790f52e00d7e8ba2e6c6fccf847c8915
6
+ metadata.gz: 4697b8dd5e29a82a88d2102cc9d983568416c8a4d14dbb54469e4f343fd1d0311c0d77e65ee4cecb2cd5446a4bb4431b6831b9a36d35927f1391e5125ac6b7da
7
+ data.tar.gz: 7ee4072275cf65f19d34715714e51e52d767830a278dd133b6eb9663a9c81c3f89f3eb9acbc4177562f65c6c6c3e5170547ba51f1991ff218d03b8e4226e0ec9
data/CHANGELOG.adoc CHANGED
@@ -4,6 +4,20 @@
4
4
  This document provides a curated view of the changes to Asciidoctor Tabs per release.
5
5
  For a detailed view of what has changed, refer to the {url-repo}/commits/main[commit history] on GitHub.
6
6
 
7
+ == 1.0.0-beta.6 (2023-08-01) - @mojavelinux
8
+
9
+ === Changed
10
+
11
+ * Repurpose example block as open block if filetype is not html
12
+
13
+ === Fixed
14
+
15
+ * Preserve attribute entries above tabs block (#64)
16
+
17
+ === Details
18
+
19
+ {url-repo}/releases/tag/v1.0.0-beta.6[git tag] | {url-repo}/compare/v1.0.0-beta.5\...v1.0.0-beta.6[full diff]
20
+
7
21
  == 1.0.0-beta.5 (2023-05-28) - @mojavelinux
8
22
 
9
23
  === Changed
data/README.adoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = Asciidoctor Tabs
2
2
  Dan Allen <https://github.com/mojavelinux[@mojavelinux]>
3
- v1.0.0-beta.5, 2023-05-28
3
+ v1.0.0-beta.6, 2023-08-01
4
4
  :idprefix:
5
5
  :idseparator: -
6
6
  ifndef::env-github[:icons: font]
@@ -7,23 +7,20 @@ module Asciidoctor
7
7
  on_context :example
8
8
 
9
9
  def process parent, reader, attrs
10
- tabs_number = (doc = parent.document).counter 'tabs-number'
10
+ doc = parent.document
11
+ return create_open_block parent, nil, attrs unless doc.attr? 'filetype', 'html'
12
+ tabs_number = doc.counter 'tabs-number'
11
13
  block = create_block parent, attrs['cloaked-context'], nil, attrs, content_model: :compound
12
14
  children = (parse_content block, reader).blocks
13
- unless children.size == 1 && (seed_tabs = children[0]).context == :dlist && seed_tabs.items?
14
- return (reset_counter doc, 'tabs-number', (tabs_number - 1)) || block
15
- end
16
- unless doc.attr? 'filetype', 'html'
17
- (id = attrs['id']) && (doc.register :refs, [(seed_tabs.id = id), seed_tabs]) unless seed_tabs.id
18
- (reftext = attrs['reftext']) && (seed_tabs.set_attr 'reftext', reftext) unless seed_tabs.reftext?
19
- parent << seed_tabs
20
- return reset_counter doc, 'tabs-number', (tabs_number - 1)
21
- end
15
+ return (reset_counter doc, 'tabs-number', (tabs_number - 1)) || block unless children.size == 1 &&
16
+ (seed_tabs = children[0]).context == :dlist && seed_tabs.items?
22
17
  tabs_id = attrs['id'] || (generate_id %(tabs #{tabs_number}), doc)
23
18
  tabs_role = 'tabs' + (!(block.option? 'nosync') && ((block.option? 'sync') || (doc.option? 'tabs-sync')) ?
24
19
  ((gid = attrs['sync-group-id']) ? %( is-sync data-sync-group-id=#{gid.gsub ' ', ?\u00a0}) : ' is-sync') : '')
25
20
  tabs_role += (tabs_user_role = attrs['role']) ? %( #{tabs_user_role} is-loading) : ' is-loading'
26
- (tabs = create_open_block parent, nil, { 'id' => tabs_id, 'role' => tabs_role }).title = attrs['title']
21
+ tabs_attrs = { 'id' => tabs_id, 'role' => tabs_role }
22
+ tabs_attrs[:attribute_entries] = attrs[:attribute_entries] if attrs.key? :attribute_entries
23
+ (tabs = create_open_block parent, nil, tabs_attrs).title = attrs['title']
27
24
  tablist = create_list parent, :ulist, { 'role' => 'tablist' }
28
25
  panes = {}
29
26
  set_id_on_tab = (doc.backend == 'html5') || (list_item_supports_id? doc)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Asciidoctor
4
4
  module Tabs
5
- VERSION = '1.0.0.beta.5'
5
+ VERSION = '1.0.0.beta.6'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-tabs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta.5
4
+ version: 1.0.0.beta.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Allen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-28 00:00:00.000000000 Z
11
+ date: 2023-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor