asciidoctor-dita-topic 1.5.4 → 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: a7db48788b397b2e457ca5240562dcaf64e82e16c3564861b540e73799686a10
4
- data.tar.gz: 4ae2eeb544f034824c3a38ac4e49664be740a6599ee3aa5da7c88a1fbcfceed4
3
+ metadata.gz: 37d3fe1b7ae8cb11eeb5e3d574ad573b4da91de2cb7a65cca8a9457a897f98f9
4
+ data.tar.gz: 1954c5d7413949d52e6fa29674c00f1dbcd66d7c55ae43affc4dd25758cf359f
5
5
  SHA512:
6
- metadata.gz: 4162bfcb43ca9a51c16635f5283f808c2090b2377ef66d37901f014bac10bb6ed4ea8146bc89543f4bc8873e60dddb82eb3d9aac3228629c7d0508332e09f88e
7
- data.tar.gz: 1cd14f6c72b84872e48e38d0c37f036014efe6661dd200be5d9052102d0143ccedb41b44f91b279ff83d8fd1e7bbe98dd322ce57e207ea341d5dc3b2bb93440e
6
+ metadata.gz: '092f0143295e2082f968ffa396ff5caba173571c03af731f219def9ffbe9f4bc6ea70e6f36ca734c9283e7ad1678401db9160ecc6933d17d0c39571317e8d25b'
7
+ data.tar.gz: 3ed083fe157dda18113807966e5f16b1bfd2f17754d60108574783a82f8d03034055315d95d2a3e4ab35697d8aab53616daca697cb4615f7e0b6d9da2a159e83
@@ -73,7 +73,7 @@ module AsciidoctorDitaTopic
73
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
 
@@ -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.4'
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.4
4
+ version: 1.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaromir Hradilek