asciidoctor-dita-topic 1.0.7 → 1.0.8

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dita-topic.rb +17 -22
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 282b184606c6d438a12c520b52f460e331d001d94c0727109639e971412db055
4
- data.tar.gz: b22f5085ea51ac0502e177d30a6df600056043d85a0c8b0cbe7a6755bd3a580a
3
+ metadata.gz: 073b164893413640198b0938df78f0b180a4a25366a34bee47cf85585efddd51
4
+ data.tar.gz: 75b381d82f68f838a237b666fe8a38929dbc99101f0024086888d83a4c59471a
5
5
  SHA512:
6
- metadata.gz: b17790a1bb95fd63098fbb73e2661fbefbd687f38167f40e7181c2222c621a52d06a45127e1f463a7bad159860bf0426dc4fc35f4ca93bc1cde42667b8b633b1
7
- data.tar.gz: e91f8fc1905a115439207edcaf04bfa2e42b36e590630e91774c20fd6f2f579e79b4887eb537e4b04d0061a1f1ba06f3a9985f64c72188fc9090913bfe996b8b
6
+ metadata.gz: f1b4cf1080f6ab776de1d62c122f89c190f68d03836bd3a41e2612c4b673ab97e2947abab161f9f4c1f976acddc9a41acf9ffcbdbfd7308a4c0e1bc64da87e17
7
+ data.tar.gz: 9acb585946816133087779410d66279ec4567118a3ed14a9ec318c353a647e50dcb5ee46adf835bfa9a94a511b0a8ec772e49fe224bac042946021ad902c5902
data/lib/dita-topic.rb CHANGED
@@ -100,8 +100,8 @@ class DitaTopic < Asciidoctor::Converter::Base
100
100
  # Open the table:
101
101
  result = ['<table outputclass="callout-list">']
102
102
  result << %(<tgroup cols="2">)
103
- result << %(<colspec colwidth="#{node.attr 'labelwidth', 15}*" />)
104
- result << %(<colspec colwidth="#{node.attr 'itemwidth', 85}*" />)
103
+ result << %(<colspec colwidth="15*" />)
104
+ result << %(<colspec colwidth="85*" />)
105
105
  result << %(<tbody>)
106
106
 
107
107
  # Process individual list items:
@@ -370,25 +370,15 @@ class DitaTopic < Asciidoctor::Converter::Base
370
370
  end
371
371
 
372
372
  def convert_listing node
373
- # Check the listing style:
374
- if node.style == 'source'
375
- # Check whether the source language is defined:
376
- language = (node.attributes.key? 'language') ? %( outputclass="language-#{node.attributes['language']}") : ''
377
-
378
- # Compose the XML output:
379
- result = <<~EOF.chomp
380
- <codeblock#{language}>
381
- #{node.content}
382
- </codeblock>
383
- EOF
384
- else
385
- # Compose the XML output:
386
- result = <<~EOF.chomp
387
- <screen>
388
- #{node.content}
389
- </screen>
390
- EOF
391
- end
373
+ # Check whether the source language is defined:
374
+ language = (node.attributes.key? 'language') ? %( outputclass="language-#{node.attributes['language']}") : ''
375
+
376
+ # Compose the XML output:
377
+ result = <<~EOF.chomp
378
+ <codeblock#{language}>
379
+ #{node.content}
380
+ </codeblock>
381
+ EOF
392
382
 
393
383
  # Return the XML output:
394
384
  add_block_title result, node.title
@@ -701,6 +691,11 @@ class DitaTopic < Asciidoctor::Converter::Base
701
691
  def compose_horizontal_dlist node
702
692
  # Open the table:
703
693
  result = ['<table outputclass="horizontal-dlist">']
694
+
695
+ # Check if the title is specified:
696
+ result << %(<title>#{node.title}</title>) if node.title?
697
+
698
+ # Define the table properties and open the tgroup:
704
699
  result << %(<tgroup cols="2">)
705
700
  result << %(<colspec colwidth="#{node.attr 'labelwidth', 15}*" />)
706
701
  result << %(<colspec colwidth="#{node.attr 'itemwidth', 85}*" />)
@@ -746,7 +741,7 @@ class DitaTopic < Asciidoctor::Converter::Base
746
741
  result << %(</table>)
747
742
 
748
743
  # Return the XML output:
749
- add_block_title (result.join LF), node.title
744
+ result.join LF
750
745
  end
751
746
 
752
747
  # Method aliases
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-dita-topic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaromir Hradilek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-19 00:00:00.000000000 Z
11
+ date: 2024-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  requirements: []
105
- rubygems_version: 3.5.11
105
+ rubygems_version: 3.5.16
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: A custom AsciiDoc converter that generates individual DITA topics