asciidoctor-dita-topic 1.5.2 → 1.5.4

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: b79eb2b45f900b9cbee57c173d9aa79db84d7f04a53bbe7deb6ecc43f9c8bf18
4
- data.tar.gz: 54894c1f9bd28473f96dc1e2918753851243c4b27f56e333c8fb7d1e2c48e7c3
3
+ metadata.gz: a7db48788b397b2e457ca5240562dcaf64e82e16c3564861b540e73799686a10
4
+ data.tar.gz: 4ae2eeb544f034824c3a38ac4e49664be740a6599ee3aa5da7c88a1fbcfceed4
5
5
  SHA512:
6
- metadata.gz: 2e800a3d97ddff033a24fa183a76ba10418053477417486156cf41887d958de4f315e1e67caaaec4315d507377e14d62cb6eca5fdc2c1bc44585ef142c26d2ef
7
- data.tar.gz: 7f989fe3f2704b87240446362e9bba85fe3eb6f03d25cc478e4bd17494101dc2314d6c9e6a96f2a6305d7792e44bca4960e078123cc54e5b99413229233d42ae
6
+ metadata.gz: 4162bfcb43ca9a51c16635f5283f808c2090b2377ef66d37901f014bac10bb6ed4ea8146bc89543f4bc8873e60dddb82eb3d9aac3228629c7d0508332e09f88e
7
+ data.tar.gz: 1cd14f6c72b84872e48e38d0c37f036014efe6661dd200be5d9052102d0143ccedb41b44f91b279ff83d8fd1e7bbe98dd322ce57e207ea341d5dc3b2bb93440e
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,8 +69,8 @@ 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
76
  opt.on('-A', '--no-modules', 'disable processing of include directives with assemblies and modules') do
@@ -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
 
@@ -23,6 +23,7 @@
23
23
 
24
24
  require 'asciidoctor'
25
25
  require 'pathname'
26
+ require_relative 'version'
26
27
 
27
28
  class FilterIncludeDirectives < Asciidoctor::Extensions::IncludeProcessor
28
29
  def handles? target
@@ -35,6 +36,10 @@ class FilterIncludeDirectives < Asciidoctor::Extensions::IncludeProcessor
35
36
  begin
36
37
  logger = Asciidoctor::LoggerManager.logger
37
38
  include_doc = Asciidoctor.load_file file_path, safe: :secure, logger: false
39
+ rescue
40
+ Asciidoctor::LoggerManager.logger = logger
41
+ logger.warn "#{AsciidoctorDitaTopic::NAME}: Failed to load AsciiDoc document: #{target}"
42
+ return reader
38
43
  ensure
39
44
  Asciidoctor::LoggerManager.logger = logger
40
45
  end
@@ -24,5 +24,6 @@
24
24
  # frozen_string_literal: true
25
25
 
26
26
  module AsciidoctorDitaTopic
27
- VERSION = '1.5.2'
27
+ VERSION = '1.5.4'
28
+ NAME = 'dita-topic'
28
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.2
4
+ version: 1.5.4
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: []