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 +4 -4
- data/lib/dita-topic/cli.rb +1 -1
- data/lib/dita-topic/version.rb +1 -1
- data/lib/dita-topic.rb +12 -12
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 11fd5a1643d253674e558d4f693b877f21ac76fe0187778145610d1c7f2fbe08
|
|
4
|
+
data.tar.gz: 647dd1a9354135c1da3585980cb5b3033518663ae14747eed89ab8e292ac2c3d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aae2ef4be77c4cb0501f2c178813f1bf867168b49409a55f3671e5c87cf4d69f1d60ed3cccf4cd3efbf91b81dd26890cea83559083396c658be9745ed0b5a9a0
|
|
7
|
+
data.tar.gz: d799dc9c5b8ba1a04e86cc98b8dd857a2a9e50e010b145f6fdf12f9c3ea14a7bc32293c3d435fafb4c9e36df2cc1491f485e80756dd1197b4a81b96027384677
|
data/lib/dita-topic/cli.rb
CHANGED
|
@@ -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
|
|
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|
|
data/lib/dita-topic/version.rb
CHANGED
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
1079
|
+
return attributes
|
|
1080
1080
|
else
|
|
1081
|
-
return ''
|
|
1081
|
+
return ''
|
|
1082
1082
|
end
|
|
1083
1083
|
end
|
|
1084
1084
|
|