asciidoctor-dita-map 0.9.3 → 0.9.4

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: 7868b5b984e99b8e02f45f267b4d493943d4232c1dc69e52169e39076f42bc01
4
- data.tar.gz: 664073302552d392ba455a64fa4f28affd2b3fa890dfb333620b077094291835
3
+ metadata.gz: 4dd982c41b3653429b386ada97215adc7c1eaf82bfdd6415d116e974e3f2446c
4
+ data.tar.gz: b547c896716b562ad96393b4802ceeaf87bf8af26270e4e8ad1ab8427d8aec3e
5
5
  SHA512:
6
- metadata.gz: c707f1e3aedc8aaec0b8be683eb9b01df94c1ce7812a994d5d6d09e727de1bd4e3c2e66a4cd84fbb06cfcb0e7fdbc0528e3b6d992c4787d1e6537450aa2f2130
7
- data.tar.gz: f7cfb07b8374bd7f5d20fcde17b2b9221a019bb236592860a09a73b87b9483f47eb65ee2e113a979a0268756f6d384fe4d463aa7a4048dd843261b8f5aebb8e9
6
+ metadata.gz: 647f898eac5920a8d976136683065acaa8ed6173bf4cf245bbebfaf9e75381f3a222866ffd1532c343900ec2508d80e800750b3ac8ecd8592141f09e5678c773
7
+ data.tar.gz: be60464080a6f54e249dd3432e8313486d3afe9298c02a5448502e5ac9ecd33cf02d943268459698d8a2ed9f12d4962f53d7caf7d05f42026737e4af91a52067
data/lib/dita-map/cli.rb CHANGED
@@ -35,6 +35,7 @@ module AsciidoctorDitaMap
35
35
  @opts = {
36
36
  :chunk => true,
37
37
  :id => true,
38
+ :locktitle => true,
38
39
  :navtitle => true,
39
40
  :output => false,
40
41
  :title => true,
@@ -89,6 +90,10 @@ module AsciidoctorDitaMap
89
90
  @opts[:chunk] = false
90
91
  end
91
92
 
93
+ opt.on('-L', '--no-locktitle', 'do not generate the locktitle attribute') do
94
+ @opts[:locktitle] = false
95
+ end
96
+
92
97
  opt.on('-N', '--no-navtitle', 'do not generate the navtitle attribute') do
93
98
  @opts[:navtitle] = false
94
99
  end
@@ -103,14 +108,14 @@ module AsciidoctorDitaMap
103
108
 
104
109
  opt.separator ''
105
110
 
106
- opt.on('-z', '--zero-offset', 'allow include directives with zero leveloffset') do
107
- @opts[:zero_offset] = true
108
- end
109
-
110
111
  opt.on('-v', '--verbose', 'report additional problems in the supplied files') do
111
112
  @opts[:verbose] = true
112
113
  end
113
114
 
115
+ opt.on('-z', '--zero-offset', 'allow include directives with zero leveloffset') do
116
+ @opts[:zero_offset] = true
117
+ end
118
+
114
119
  opt.separator ''
115
120
 
116
121
  opt.on('-h', '--help', 'display this help and exit') do
@@ -149,12 +154,13 @@ module AsciidoctorDitaMap
149
154
  end
150
155
 
151
156
  def compose_topicref_attributes file_info, title, type
152
- target_file = file_info[:target].sub(/\.adoc$/, '.dita')
153
- attributes = { 'href' => target_file }
154
- attributes['navtitle'] = title if @opts[:navtitle] and title
155
- attributes['type'] = type if @opts[:type] and type and ['concept', 'reference', 'task'].include? type
156
- attributes['chunk'] = file_info[:chunk] if @opts[:chunk] and file_info[:chunk]
157
- attributes['toc'] = file_info[:toc] if @opts[:toc] and file_info[:toc]
157
+ target_file = file_info[:target].sub(/\.adoc$/, '.dita')
158
+ attributes = { 'href' => target_file }
159
+ attributes['navtitle'] = title if @opts[:navtitle] and title
160
+ attributes['locktitle'] = 'yes' if @opts[:locktitle] and attributes['navtitle']
161
+ attributes['type'] = type if @opts[:type] and type and ['concept', 'reference', 'task'].include? type
162
+ attributes['chunk'] = file_info[:chunk] if @opts[:chunk] and file_info[:chunk]
163
+ attributes['toc'] = file_info[:toc] if @opts[:toc] and file_info[:toc]
158
164
 
159
165
  return attributes
160
166
  end
@@ -24,5 +24,5 @@
24
24
  # frozen_string_literal: true
25
25
 
26
26
  module AsciidoctorDitaMap
27
- VERSION = '0.9.3'
27
+ VERSION = '0.9.4'
28
28
  end
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.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaromir Hradilek