asciidoctor-dita-map 0.9.10 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65632c6df171bc8a0d2f518aa1e5d2a00928582cf7468edfe38ab2cfa69418d9
4
- data.tar.gz: 48e2e26502c6e3979d4aeaa77064176eeabfb315221e88b7d3330411d2265f4d
3
+ metadata.gz: 6057b52f639b72c6cd979278396d3694aabcd1d77263c6bc5992c4629c4e7cdd
4
+ data.tar.gz: b4cf056a674cc2dd1ecbee69a663ca5f09e284d19a12be14ad8ccf8159d53d42
5
5
  SHA512:
6
- metadata.gz: d64f8d5d83fe46b8387dc5e65245bd5fbf2f0b968c7519ff40499113953d920fe3d0977a96eabbda21d95e4724f1f8386afdae69337bf47eb17825bda8814937
7
- data.tar.gz: 2a37fc303b7b5657aa0b6c9aa5d9104082a93ad5b984f8815c67b1b6370ce2a9cc53058a039575f6882bd10d7b5804a79a0f815d8dc0d8269145a8a3b6fcbd2a
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 = nil
33
- @converter = Convert.new
34
- @args = self.parse_args argv
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
@@ -25,5 +25,5 @@
25
25
 
26
26
  module AsciidoctorDitaMap
27
27
  NAME = 'dita-map'
28
- VERSION = '0.9.10'
28
+ VERSION = '0.9.11'
29
29
  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.10
4
+ version: 0.9.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaromir Hradilek