asciidoctor-dita-topic 1.4.6 → 1.4.7

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: 7690eaba37e895e876771c847da1ed9bdbed1a6c697c843a4ab6c2b68e76e7b6
4
- data.tar.gz: c4661d29f5dd07245e438e9f44446bfee3030b885d4b38d4d39964ef5031872e
3
+ metadata.gz: aa49c2e77c20ed32770fa37f0a286ca5a5aa808c5fef1e11c70bce3ac5fc3f74
4
+ data.tar.gz: 698164a21ee241367c0ebc3d029759e546618514ac91d93e7076abe0eea58ca7
5
5
  SHA512:
6
- metadata.gz: 05ae4c5ca74d8b200ef763026171a1d82cc63c8fbd1a3492d6f5c53e5c5ecf525a72422b974c52093812ab76497167234042a44cb753b8dec7814678a6b6dde8
7
- data.tar.gz: 238cb4a1a4f9f037f13ac8686ff9766d0100621044df8d0990374cc59c77743edb3fa888b07d23147a20678d660659e36c452348956027634a15eef86c15f7e4
6
+ metadata.gz: 6ddefc4aec275a5ce85990ca28bdcffe0d2a8033834112c5eea7c225f0420af2de96f952661799a17b3c2134739001ccf7f6323b7f8953a191f4dc9dcfb18ada
7
+ data.tar.gz: 1088e887c924235e473b9f23aa04e4e3a41e3f8f307857342f7f852b2de5791e2917d7b69c74ff8f487e1c82098d62cbe993f1b8fd9c9f72f127e7284dd14fe1
@@ -33,9 +33,9 @@ module AsciidoctorDitaTopic
33
33
  @attr = ['experimental']
34
34
  @opts = {
35
35
  :output => false,
36
- :includes => true,
37
36
  :standalone => true,
38
- :map => false
37
+ :map => false,
38
+ :no_includes => 0
39
39
  }
40
40
  @prep = []
41
41
  @name = name
@@ -72,8 +72,8 @@ module AsciidoctorDitaTopic
72
72
  @prep.append file
73
73
  end
74
74
 
75
- opt.on('-I', '--no-includes', 'disable processing of include directives') do
76
- @opts[:includes] = false
75
+ opt.on('-I', '--no-includes', 'disable processing of include directives; specify this option twice to also apply on prepended files') do
76
+ @opts[:no_includes] += 1
77
77
  end
78
78
 
79
79
  opt.separator ''
@@ -216,7 +216,9 @@ module AsciidoctorDitaTopic
216
216
  output = @opts[:output] ? @opts[:output] : Pathname.new(file).sub_ext(suffix).to_s
217
217
  end
218
218
 
219
- input.gsub!(Asciidoctor::IncludeDirectiveRx, '//\&') unless @opts[:includes]
219
+ prepended.gsub!(/^:_(?:mod-docs-content|content|module)-type:[ \t]+\S/, '//\&')
220
+ prepended.gsub!(Asciidoctor::IncludeDirectiveRx, '//\&') if @opts[:no_includes] > 1
221
+ input.gsub!(Asciidoctor::IncludeDirectiveRx, '//\&') if @opts[:no_includes] > 0
220
222
 
221
223
  if @opts[:map]
222
224
  result = convert_map file, prepended + input, base_dir
@@ -24,5 +24,5 @@
24
24
  # frozen_string_literal: true
25
25
 
26
26
  module AsciidoctorDitaTopic
27
- VERSION = '1.4.6'
27
+ VERSION = '1.4.7'
28
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-dita-topic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.6
4
+ version: 1.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaromir Hradilek