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.
- checksums.yaml +4 -4
- data/lib/dita-topic.rb +17 -22
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 073b164893413640198b0938df78f0b180a4a25366a34bee47cf85585efddd51
|
4
|
+
data.tar.gz: 75b381d82f68f838a237b666fe8a38929dbc99101f0024086888d83a4c59471a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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="
|
104
|
-
result << %(<colspec colwidth="
|
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
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
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
|
-
|
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.
|
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-
|
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.
|
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
|