asciidoctor-dita-topic 1.4.4 → 1.4.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 +4 -10
- 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: 8f6ab85df9ce5321111233e1d6010ffbaff45ef483429b52f1c4f1e21b24a599
|
|
4
|
+
data.tar.gz: 3032b2f55d0e62d5259ab80172c0ae6e22c64d0dad22d6af3e93de9b16432429
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3a0b76fb1014db44d1b4480ba9b3769104651ef209e74b3557e8c4834719ae44982604d7423729c3a57fdd226e275fe07bca439239cf8eb574c6b7d0f7b8a0be
|
|
7
|
+
data.tar.gz: c0b2aeb4ffc8bd7c21ff1cb26ea9112eb48b651e7137c696a2a2dda4789077f9e98ce754d04c2ede6523a0380d89527f1846a27549951442252e0e38b5e23bd4
|
data/lib/dita-topic/cli.rb
CHANGED
|
@@ -198,14 +198,8 @@ module AsciidoctorDitaTopic
|
|
|
198
198
|
end
|
|
199
199
|
end
|
|
200
200
|
|
|
201
|
-
def convert_topic
|
|
202
|
-
|
|
203
|
-
base_dir = Pathname.new(Dir.pwd).expand_path
|
|
204
|
-
else
|
|
205
|
-
base_dir = Pathname.new(file).dirname.expand_path
|
|
206
|
-
end
|
|
207
|
-
|
|
208
|
-
Asciidoctor.convert input, backend: 'dita-topic', standalone: @opts[:standalone], safe: :unsafe, attributes: @attr, to_file: output, base_dir: base_dir
|
|
201
|
+
def convert_topic input, output
|
|
202
|
+
Asciidoctor.convert input, backend: 'dita-topic', standalone: @opts[:standalone], safe: :unsafe, attributes: @attr, to_file: output
|
|
209
203
|
end
|
|
210
204
|
|
|
211
205
|
def run
|
|
@@ -223,7 +217,7 @@ module AsciidoctorDitaTopic
|
|
|
223
217
|
else
|
|
224
218
|
suffix = @opts[:map] ? '.ditamap' : '.dita'
|
|
225
219
|
input = File.read(file)
|
|
226
|
-
output = @opts[:output] ? @opts[:output] : Pathname.new(file).sub_ext(suffix)
|
|
220
|
+
output = @opts[:output] ? @opts[:output] : Pathname.new(file).sub_ext(suffix).to_s
|
|
227
221
|
end
|
|
228
222
|
|
|
229
223
|
input.gsub!(Asciidoctor::IncludeDirectiveRx, '//\&') unless @opts[:includes]
|
|
@@ -231,7 +225,7 @@ module AsciidoctorDitaTopic
|
|
|
231
225
|
if @opts[:map]
|
|
232
226
|
convert_map file, prepended + input, output
|
|
233
227
|
else
|
|
234
|
-
convert_topic
|
|
228
|
+
convert_topic prepended + input, output
|
|
235
229
|
end
|
|
236
230
|
end
|
|
237
231
|
end
|
data/lib/dita-topic/version.rb
CHANGED