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 +4 -4
- data/lib/dita-topic/cli.rb +1 -1
- data/lib/dita-topic/filter.rb +8 -2
- data/lib/dita-topic/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: 37d3fe1b7ae8cb11eeb5e3d574ad573b4da91de2cb7a65cca8a9457a897f98f9
|
|
4
|
+
data.tar.gz: 1954c5d7413949d52e6fa29674c00f1dbcd66d7c55ae43affc4dd25758cf359f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '092f0143295e2082f968ffa396ff5caba173571c03af731f219def9ffbe9f4bc6ea70e6f36ca734c9283e7ad1678401db9160ecc6933d17d0c39571317e8d25b'
|
|
7
|
+
data.tar.gz: 3ed083fe157dda18113807966e5f16b1bfd2f17754d60108574783a82f8d03034055315d95d2a3e4ab35697d8aab53616daca697cb4615f7e0b6d9da2a159e83
|
data/lib/dita-topic/cli.rb
CHANGED
|
@@ -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
|
|
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
|
|
data/lib/dita-topic/filter.rb
CHANGED
|
@@ -31,7 +31,13 @@ class FilterIncludeDirectives < Asciidoctor::Extensions::IncludeProcessor
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
def process doc, reader, target, attributes
|
|
34
|
-
|
|
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
|
-
['
|
|
64
|
+
['snippet'].include? type
|
|
59
65
|
end
|
|
60
66
|
end
|
data/lib/dita-topic/version.rb
CHANGED