asciidoctor-dita-topic 1.4.2 → 1.4.3

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: 309a32eee2e59c3b1ef187bfbf1a36a87777c49834aae48c5c4889313638ab53
4
- data.tar.gz: 4653870065c2f971cdaefa3c372c30bb3d22ee20cc88c0daf54f30b912eb8f21
3
+ metadata.gz: 11fd5a1643d253674e558d4f693b877f21ac76fe0187778145610d1c7f2fbe08
4
+ data.tar.gz: 647dd1a9354135c1da3585980cb5b3033518663ae14747eed89ab8e292ac2c3d
5
5
  SHA512:
6
- metadata.gz: 99037921c854d2a292fb3d973373cdc2e89e5a99d76b98755e20a0f9e7e8dc5b096530428c0a2e629b73e0344840537e89ef4e50815f1e30243b72b5ff16ea18
7
- data.tar.gz: eca7844a1bfb3f1afea7dbbdfe4b78d0ffbedd6927f8c180615ffa11d899a1c0832ca181321d94ea8615ec4aecddf77c3d941e5b4a11cc18dac6a256cc913c9a
6
+ metadata.gz: aae2ef4be77c4cb0501f2c178813f1bf867168b49409a55f3671e5c87cf4d69f1d60ed3cccf4cd3efbf91b81dd26890cea83559083396c658be9745ed0b5a9a0
7
+ data.tar.gz: d799dc9c5b8ba1a04e86cc98b8dd857a2a9e50e010b145f6fdf12f9c3ea14a7bc32293c3d435fafb4c9e36df2cc1491f485e80756dd1197b4a81b96027384677
@@ -38,7 +38,7 @@ module AsciidoctorDitaTopic
38
38
 
39
39
  def parse_args argv
40
40
  parser = OptionParser.new do |opt|
41
- opt.banner = "Usage: #{@name} [OPTION...] FILE...\n"
41
+ opt.banner = "Usage: #{@name} [OPTION...] [FILE...]\n"
42
42
  opt.banner += " #{@name} -h|-v\n\n"
43
43
 
44
44
  opt.on('-o', '--out-file FILE', 'output file; by default, the output file name is based on the input file') do |output|
@@ -24,5 +24,5 @@
24
24
  # frozen_string_literal: true
25
25
 
26
26
  module AsciidoctorDitaTopic
27
- VERSION = '1.4.2'
27
+ VERSION = '1.4.3'
28
28
  end
data/lib/dita-topic.rb CHANGED
@@ -203,7 +203,7 @@ class DitaTopic < Asciidoctor::Converter::Base
203
203
  # Process individual list items:
204
204
  node.items.each do |terms, description|
205
205
  # Compose the metadata attributes:
206
- metadata, terms[0].text = extract_attributes terms[0].text
206
+ metadata = extract_attributes terms[0].text
207
207
 
208
208
  # Open the definition entry:
209
209
  result << %(<dlentry#{metadata}>)
@@ -534,16 +534,16 @@ class DitaTopic < Asciidoctor::Converter::Base
534
534
  # Process individual list items:
535
535
  node.items.each do |item|
536
536
  # Compose the metadata attributes:
537
- metadata, text = extract_attributes item.text
537
+ metadata = extract_attributes item.text
538
538
  metadata = compose_metadata item.role if item.role
539
539
 
540
540
  # Check if the list item contains multiple block elements:
541
541
  if item.blocks?
542
- result << %(<li#{compose_id item.id}#{metadata}>#{text})
542
+ result << %(<li#{compose_id item.id}#{metadata}>#{item.text})
543
543
  result << item.content
544
544
  result << %(</li>)
545
545
  else
546
- result << %(<li#{compose_id item.id}#{metadata}>#{text}</li>)
546
+ result << %(<li#{compose_id item.id}#{metadata}>#{item.text}</li>)
547
547
  end
548
548
  end
549
549
 
@@ -709,7 +709,7 @@ class DitaTopic < Asciidoctor::Converter::Base
709
709
  # Process each row:
710
710
  rows.each do |row|
711
711
  # Compose the metadata attributes:
712
- metadata, row[0].text = extract_attributes row[0].text
712
+ metadata = extract_attributes row[0].text
713
713
 
714
714
  # Open the row:
715
715
  result << %(<row#{metadata}>)
@@ -777,7 +777,7 @@ class DitaTopic < Asciidoctor::Converter::Base
777
777
  # Process individual list items:
778
778
  node.items.each do |item|
779
779
  # Compose the metadata attributes:
780
- metadata, text = extract_attributes item.text
780
+ metadata = extract_attributes item.text
781
781
  metadata = compose_metadata item.role if item.role
782
782
 
783
783
  # Check if the list item is part of a checklist:
@@ -789,11 +789,11 @@ class DitaTopic < Asciidoctor::Converter::Base
789
789
 
790
790
  # Check if the list item contains multiple block elements:
791
791
  if item.blocks?
792
- result << %(<li#{compose_id item.id}#{metadata}>#{check_box}#{text})
792
+ result << %(<li#{compose_id item.id}#{metadata}>#{check_box}#{item.text})
793
793
  result << item.content
794
794
  result << %(</li>)
795
795
  else
796
- result << %(<li#{compose_id item.id}#{metadata}>#{check_box}#{text}</li>)
796
+ result << %(<li#{compose_id item.id}#{metadata}>#{check_box}#{item.text}</li>)
797
797
  end
798
798
  end
799
799
 
@@ -864,7 +864,7 @@ class DitaTopic < Asciidoctor::Converter::Base
864
864
  # Process individual list items:
865
865
  node.items.each do |terms, description|
866
866
  # Compose the metadata attributes:
867
- metadata, terms[0].text = extract_attributes terms[0].text
867
+ metadata = extract_attributes terms[0].text
868
868
 
869
869
  # Open the list item:
870
870
  result << %(<li#{metadata}>)
@@ -907,7 +907,7 @@ class DitaTopic < Asciidoctor::Converter::Base
907
907
  # Process individual list items:
908
908
  node.items.each do |terms, description|
909
909
  # Compose the metadata attributes:
910
- metadata, terms[0].text = extract_attributes terms[0].text
910
+ metadata = extract_attributes terms[0].text
911
911
 
912
912
  # Open the table row:
913
913
  result << %(<row#{metadata}>)
@@ -1076,9 +1076,9 @@ class DitaTopic < Asciidoctor::Converter::Base
1076
1076
  def extract_attributes text
1077
1077
  # Extract metadata attributes from an empty ph element:
1078
1078
  if /^\s*<ph(?<attributes> [^>]+)><\/ph>\s*/ =~ text
1079
- return attributes, text.sub(/^\s*<ph[^>]+><\/ph>\s*/, '')
1079
+ return attributes
1080
1080
  else
1081
- return '', text
1081
+ return ''
1082
1082
  end
1083
1083
  end
1084
1084
 
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.4.2
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaromir Hradilek