asciidoctor-dita-map 0.9.6 → 0.9.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-map/cli.rb +4 -4
- data/lib/dita-map/convert.rb +13 -3
- data/lib/dita-map/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ac58b2d84b3b473e585e54b765b2a1c1591c003f61a4f188e302ba34b4917f0f
|
|
4
|
+
data.tar.gz: f06f028b3916d95e3be9bab9c74a7387b6a84e6c76c1b7c763d5b1ca31f46c05
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e6530d77eedae5de3630258c36be601395956339f8e432098b1d0124b62a717c922ad4634961e44aca284fe5df096534de4ef06c87de7146c19bb7597200db9e
|
|
7
|
+
data.tar.gz: ad74cbb5c2bde3ebccb5e559c025ec3000a812b24fed35aa95bb291ebf22868ec082b216b243247a200691f2da545e1374f4d695a3bf6aae4a55a211be489549
|
data/lib/dita-map/cli.rb
CHANGED
|
@@ -63,6 +63,10 @@ module AsciidoctorDitaMap
|
|
|
63
63
|
|
|
64
64
|
opt.separator ''
|
|
65
65
|
|
|
66
|
+
opt.on('-A', '--no-assembly', 'do not treat assemblies as maps') do
|
|
67
|
+
@converter.opts[:assembly] = false
|
|
68
|
+
end
|
|
69
|
+
|
|
66
70
|
opt.on('-I', '--no-id', 'do not generate the map id attribute') do
|
|
67
71
|
@converter.opts[:id] = false
|
|
68
72
|
end
|
|
@@ -71,10 +75,6 @@ module AsciidoctorDitaMap
|
|
|
71
75
|
@converter.opts[:title] = false
|
|
72
76
|
end
|
|
73
77
|
|
|
74
|
-
opt.on('-A', '--no-assembly', 'do treat assemblies as maps') do
|
|
75
|
-
@converter.opts[:assembly] = false
|
|
76
|
-
end
|
|
77
|
-
|
|
78
78
|
opt.on('-C', '--no-chunk', 'do not generate the chunk attribute') do
|
|
79
79
|
@converter.opts[:chunk] = false
|
|
80
80
|
end
|
data/lib/dita-map/convert.rb
CHANGED
|
@@ -47,12 +47,18 @@ module AsciidoctorDitaMap
|
|
|
47
47
|
@prep = ''
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
-
def compose_mapref_attributes element, file_info
|
|
50
|
+
def compose_mapref_attributes element, file_info
|
|
51
51
|
target_file = file_info[:target].sub(/\.adoc$/, '.ditamap')
|
|
52
52
|
|
|
53
53
|
element.add_attribute 'href', target_file
|
|
54
|
+
|
|
55
|
+
if file_info[:navtitle]
|
|
56
|
+
element.add_attribute REXML::Attribute.new('navtitle', file_info[:navtitle]) if @opts[:navtitle]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
element.add_attribute 'locktitle', 'yes' if @opts[:locktitle] and element['navtitle']
|
|
54
60
|
element.add_attribute 'format', 'ditamap'
|
|
55
|
-
element.add_attribute 'type',
|
|
61
|
+
element.add_attribute 'type', 'map' if @opts[:type]
|
|
56
62
|
element.add_attribute 'chunk', file_info[:chunk] if @opts[:chunk] and file_info[:chunk]
|
|
57
63
|
element.add_attribute 'toc', file_info[:toc] if @opts[:toc] and file_info[:toc]
|
|
58
64
|
end
|
|
@@ -139,11 +145,15 @@ module AsciidoctorDitaMap
|
|
|
139
145
|
|
|
140
146
|
xml_parent = stack.last[:element]
|
|
141
147
|
|
|
148
|
+
if xml_parent.name == 'mapref'
|
|
149
|
+
warn "#{NAME}: warning: invalid mapref child element: #{target}"
|
|
150
|
+
end
|
|
151
|
+
|
|
142
152
|
topic.type.sub!(/^assembly$/, 'concept') if not @opts[:assembly]
|
|
143
153
|
|
|
144
154
|
if topic.type == 'map' or topic.type == 'assembly'
|
|
145
155
|
xml_element = xml_parent.add_element('mapref')
|
|
146
|
-
compose_mapref_attributes xml_element, file_info
|
|
156
|
+
compose_mapref_attributes xml_element, file_info
|
|
147
157
|
else
|
|
148
158
|
xml_element = xml_parent.add_element('topicref')
|
|
149
159
|
compose_topicref_attributes xml_element, file_info, topic.title, topic.type
|
data/lib/dita-map/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: asciidoctor-dita-map
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jaromir Hradilek
|
|
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
142
142
|
- !ruby/object:Gem::Version
|
|
143
143
|
version: '0'
|
|
144
144
|
requirements: []
|
|
145
|
-
rubygems_version: 4.0.
|
|
145
|
+
rubygems_version: 4.0.10
|
|
146
146
|
specification_version: 4
|
|
147
147
|
summary: Convert an AsciiDoc file to a DITA map
|
|
148
148
|
test_files: []
|