asciidoctor-dita-map 0.9.9 → 0.9.11
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 +10 -3
- data/lib/dita-map/convert.rb +1 -1
- data/lib/dita-map/topic.rb +1 -1
- data/lib/dita-map/version.rb +1 -1
- 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: 6057b52f639b72c6cd979278396d3694aabcd1d77263c6bc5992c4629c4e7cdd
|
|
4
|
+
data.tar.gz: b4cf056a674cc2dd1ecbee69a663ca5f09e284d19a12be14ad8ccf8159d53d42
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3da991606dec33d2cd30ce6135a52630e6873d04aac93590b450ac167699c1a3448e7bef509666280400f7f2286c0167abb6aed0c44298fa63bb3762fdd6c913
|
|
7
|
+
data.tar.gz: 26f707cbd3095e2170055a757fc37b03933e768604121ea87d64ff079346897b49278b713e87e3b5e8e32d51cc51ce187b2cbb62a5027e0ed1014b66a2a91df4
|
data/lib/dita-map/cli.rb
CHANGED
|
@@ -29,9 +29,10 @@ require_relative 'version'
|
|
|
29
29
|
module AsciidoctorDitaMap
|
|
30
30
|
class Cli
|
|
31
31
|
def initialize argv
|
|
32
|
-
@output
|
|
33
|
-
@
|
|
34
|
-
@
|
|
32
|
+
@output = nil
|
|
33
|
+
@conditionals = false
|
|
34
|
+
@converter = Convert.new
|
|
35
|
+
@args = self.parse_args argv
|
|
35
36
|
end
|
|
36
37
|
|
|
37
38
|
def parse_args argv
|
|
@@ -61,6 +62,10 @@ module AsciidoctorDitaMap
|
|
|
61
62
|
@converter.opts[:self] = true
|
|
62
63
|
end
|
|
63
64
|
|
|
65
|
+
opt.on('-c', '--conditionals', 'do not ignore conditional directives when processing the file') do
|
|
66
|
+
@conditionals = true
|
|
67
|
+
end
|
|
68
|
+
|
|
64
69
|
opt.separator ''
|
|
65
70
|
|
|
66
71
|
opt.on('-A', '--no-assembly', 'do not treat assemblies as maps') do
|
|
@@ -144,6 +149,8 @@ module AsciidoctorDitaMap
|
|
|
144
149
|
output = @output ? @output : Pathname.new(file).sub_ext('.ditamap').to_s
|
|
145
150
|
end
|
|
146
151
|
|
|
152
|
+
input.gsub!(/^(?:ifn?def|ifeval|endif)::\S*\[(.*)\]\s*$/, '\1') if not @conditionals
|
|
153
|
+
|
|
147
154
|
if @converter.opts[:self] and file != $stdin
|
|
148
155
|
result = @converter.run input, base_dir, file
|
|
149
156
|
else
|
data/lib/dita-map/convert.rb
CHANGED
|
@@ -121,7 +121,7 @@ module AsciidoctorDitaMap
|
|
|
121
121
|
|
|
122
122
|
begin
|
|
123
123
|
topic = Topic.new @prep + File.read(full_path), @attr
|
|
124
|
-
next if ['attributes', 'snippet'].include? topic.type
|
|
124
|
+
next if ['attributes', 'snippet', 'ignore'].include? topic.type
|
|
125
125
|
rescue
|
|
126
126
|
warn "#{NAME}: warning: unable to read included file: #{target}"
|
|
127
127
|
topic = Topic.new ''
|
data/lib/dita-map/topic.rb
CHANGED
|
@@ -50,7 +50,7 @@ module AsciidoctorDitaMap
|
|
|
50
50
|
type.sub!(/^procedure$/, 'task')
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
-
unless ['assembly', 'concept', 'reference', 'task', 'map', 'attributes', 'snippet'].include? type
|
|
53
|
+
unless ['assembly', 'concept', 'reference', 'task', 'map', 'attributes', 'snippet', 'ignore'].include? type
|
|
54
54
|
return nil
|
|
55
55
|
end
|
|
56
56
|
|
data/lib/dita-map/version.rb
CHANGED