asciidoctor-dita-topic 1.5.5 → 1.5.7

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: 37d3fe1b7ae8cb11eeb5e3d574ad573b4da91de2cb7a65cca8a9457a897f98f9
4
- data.tar.gz: 1954c5d7413949d52e6fa29674c00f1dbcd66d7c55ae43affc4dd25758cf359f
3
+ metadata.gz: '09c231f93a6e5c0f7fb4f0144b09ce3ce55981dc3b9e4defbcda84e2994cdb4d'
4
+ data.tar.gz: 3ecf4e1198682b1a90bdc584fcf802a8be2edeb3593146e9e31a031b0dfcc9e8
5
5
  SHA512:
6
- metadata.gz: '092f0143295e2082f968ffa396ff5caba173571c03af731f219def9ffbe9f4bc6ea70e6f36ca734c9283e7ad1678401db9160ecc6933d17d0c39571317e8d25b'
7
- data.tar.gz: 3ed083fe157dda18113807966e5f16b1bfd2f17754d60108574783a82f8d03034055315d95d2a3e4ab35697d8aab53616daca697cb4615f7e0b6d9da2a159e83
6
+ metadata.gz: e98201b70b353b9b898f932b82612fbce2f22f9cb650a70dd66b2d3c40a4ea4e9ecf986ddb9c096b6c05246b8df78fe36e8cd94a3e283851553d6d1d661b5851
7
+ data.tar.gz: 20de10b430305e756d9e790b356e515a46425a90a66d3bcf1dedfedab81be876aa85cb7d9c657fbacf75b740335b16ad89c19afdffe8d3da9a89b19bb9e6ffa7
@@ -24,6 +24,6 @@
24
24
  # frozen_string_literal: true
25
25
 
26
26
  module AsciidoctorDitaTopic
27
- VERSION = '1.5.5'
27
+ VERSION = '1.5.7'
28
28
  NAME = 'dita-topic'
29
29
  end
data/lib/dita-topic.rb CHANGED
@@ -524,11 +524,17 @@ class DitaTopic < Asciidoctor::Converter::Base
524
524
  # Check whether the source language is defined:
525
525
  language = (node.attributes.key? 'language') ? %( outputclass="language-#{node.attributes['language']}") : ''
526
526
 
527
- # Compose the XML output:
528
- result = %(<codeblock#{language}#{compose_id node.id}#{compose_metadata node.role}>#{node.content}</codeblock>)
529
-
530
- # Return the XML output:
531
- add_block_title result, node
527
+ # Check if the listing has a title specified:
528
+ if node.title?
529
+ # Compose the XML output:
530
+ <<~EOF.chomp
531
+ <p#{compose_id node.id}#{compose_metadata node.role}><b>#{node.title}</b></p>
532
+ <codeblock#{language}#{compose_metadata node.role}>#{node.content}</codeblock>
533
+ EOF
534
+ else
535
+ # Compose the XML output:
536
+ %(<codeblock#{language}#{compose_id node.id}#{compose_metadata node.role}>#{node.content}</codeblock>)
537
+ end
532
538
  end
533
539
 
534
540
  def convert_literal node
@@ -537,6 +543,18 @@ class DitaTopic < Asciidoctor::Converter::Base
537
543
 
538
544
  # Return the XML output:
539
545
  add_block_title result, node
546
+
547
+ # Check if the listing has a title specified:
548
+ if node.title?
549
+ # Compose the XML output:
550
+ <<~EOF.chomp
551
+ <p#{compose_id node.id}#{compose_metadata node.role}><b>#{node.title}</b></p>
552
+ <pre#{compose_metadata node.role}>#{node.content}</pre>
553
+ EOF
554
+ else
555
+ # Compose the XML output:
556
+ %(<pre#{compose_id node.id}#{compose_metadata node.role}>#{node.content}</pre>)
557
+ end
540
558
  end
541
559
 
542
560
  def convert_olist node
@@ -1077,6 +1095,9 @@ class DitaTopic < Asciidoctor::Converter::Base
1077
1095
  # Ignore unsupported attribute names:
1078
1096
  next unless valid.value? attribute
1079
1097
 
1098
+ # Separate multiple attribute values:
1099
+ value.gsub!(/\+/, ' ')
1100
+
1080
1101
  # Append the value to the attribute:
1081
1102
  if result.key? attribute
1082
1103
  result[attribute] << %( #{value})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-dita-topic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaromir Hradilek
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0'
142
142
  requirements: []
143
- rubygems_version: 4.0.21
143
+ rubygems_version: 4.0.22
144
144
  specification_version: 4
145
145
  summary: A custom AsciiDoc converter that generates individual DITA topics
146
146
  test_files: []