asciidoctor-dita-topic 1.5.3 → 1.5.5

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: c1fdb04438dfebfea62e9b3acc42cb7fb49163f16ec12d32600f1278bd4d1d2d
4
- data.tar.gz: d74b1ba6b6a927fd6135e480c05a24f81edb1e0be342a48ac11c3c70434fe2c6
3
+ metadata.gz: 37d3fe1b7ae8cb11eeb5e3d574ad573b4da91de2cb7a65cca8a9457a897f98f9
4
+ data.tar.gz: 1954c5d7413949d52e6fa29674c00f1dbcd66d7c55ae43affc4dd25758cf359f
5
5
  SHA512:
6
- metadata.gz: 85412cefbd22bac8cfe57783bf01c8e75699ecef6b1309a9789679d64e7028a4e9b0431aad443f01b8746c49467e59702ac6f77cdb52a1338b6cdc8e7b412c56
7
- data.tar.gz: 3f4fc350a02a7bfe2b75cd626b3e1942061bc9b59cd77793826ce3c882e3164b107be723da60ba076c9b4c4c38d4c83253fc9754bae09f67fd97b539fd057466
6
+ metadata.gz: '092f0143295e2082f968ffa396ff5caba173571c03af731f219def9ffbe9f4bc6ea70e6f36ca734c9283e7ad1678401db9160ecc6933d17d0c39571317e8d25b'
7
+ data.tar.gz: 3ed083fe157dda18113807966e5f16b1bfd2f17754d60108574783a82f8d03034055315d95d2a3e4ab35697d8aab53616daca697cb4615f7e0b6d9da2a159e83
data/README.adoc CHANGED
@@ -29,7 +29,7 @@ $ *dita-convert -g _source_file.dita_ -o _output_file.dita_*
29
29
  +
30
30
  [literal,subs="+quotes"]
31
31
  ....
32
- $ *dita-cleanup -iI -D ../images -X . _output_file.dita_*
32
+ $ *dita-cleanup -i -D ../images -X . _output_file.dita_*
33
33
  ....
34
34
 
35
35
  [#install]
@@ -272,7 +272,7 @@ Unlike AsciiDoc, DITA provides a number of semantic elements for software compon
272
272
 
273
273
  | option
274
274
  | `<option>`
275
- | An command-line option.
275
+ | A command-line option.
276
276
 
277
277
  | variable
278
278
  | `<varname>`
@@ -36,7 +36,7 @@ module AsciidoctorDitaTopic
36
36
  :output => false,
37
37
  :standalone => true,
38
38
  :modules => true,
39
- :no_includes => 0
39
+ :no_includes => false
40
40
  }
41
41
  @prep = []
42
42
  @name = name
@@ -69,11 +69,11 @@ module AsciidoctorDitaTopic
69
69
  @prep.append file
70
70
  end
71
71
 
72
- opt.on('-I', '--no-includes', 'disable processing of include directives; specify this option twice to also apply on prepended files') do
73
- @opts[:no_includes] += 1
72
+ opt.on('-I', '--no-includes', 'disable processing of include directives') do
73
+ @opts[:no_includes] = true
74
74
  end
75
75
 
76
- opt.on('-A', '--no-modules', 'disable processing of include directives with assemblies and modules') do
76
+ opt.on('-A', '--no-modules', 'disable processing of include directives with assemblies, modules, and attributes') do
77
77
  @opts[:modules] = false
78
78
  end
79
79
 
@@ -163,8 +163,8 @@ module AsciidoctorDitaTopic
163
163
  end
164
164
 
165
165
  prepended.gsub!(/^:_(?:mod-docs-content|content|module)-type:[ \t]+\S/, '//\&')
166
- prepended.gsub!(Asciidoctor::IncludeDirectiveRx, '//\&') if @opts[:no_includes] > 1
167
- input.gsub!(Asciidoctor::IncludeDirectiveRx, '//\&') if @opts[:no_includes] > 0
166
+ prepended.gsub!(Asciidoctor::IncludeDirectiveRx, '')
167
+ input.gsub!(Asciidoctor::IncludeDirectiveRx, '') if @opts[:no_includes]
168
168
 
169
169
  result = convert_topic prepended + input, base_dir
170
170
 
@@ -31,7 +31,13 @@ class FilterIncludeDirectives < Asciidoctor::Extensions::IncludeProcessor
31
31
  end
32
32
 
33
33
  def process doc, reader, target, attributes
34
- file_path = Pathname.new(doc.base_dir) + target
34
+ base_dir = Pathname.new(doc.base_dir)
35
+
36
+ if reader.cursor.file
37
+ file_path = base_dir + Pathname.new(reader.cursor.file).dirname + target
38
+ else
39
+ file_path = base_dir + target
40
+ end
35
41
 
36
42
  begin
37
43
  logger = Asciidoctor::LoggerManager.logger
@@ -55,6 +61,6 @@ class FilterIncludeDirectives < Asciidoctor::Extensions::IncludeProcessor
55
61
  type = attributes['_content-type'] ? attributes['_content-type'].downcase : nil unless type
56
62
  type = attributes['_module-type'] ? attributes['_module-type'].downcase : nil unless type
57
63
 
58
- ['attributes', 'snippet'].include? type
64
+ ['snippet'].include? type
59
65
  end
60
66
  end
@@ -24,6 +24,6 @@
24
24
  # frozen_string_literal: true
25
25
 
26
26
  module AsciidoctorDitaTopic
27
- VERSION = '1.5.3'
27
+ VERSION = '1.5.5'
28
28
  NAME = 'dita-topic'
29
29
  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.5.3
4
+ version: 1.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaromir Hradilek
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0'
142
142
  requirements: []
143
- rubygems_version: 4.0.17
143
+ rubygems_version: 4.0.21
144
144
  specification_version: 4
145
145
  summary: A custom AsciiDoc converter that generates individual DITA topics
146
146
  test_files: []