asciidoctor-dita-map 0.9.11 → 0.9.12

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: 6057b52f639b72c6cd979278396d3694aabcd1d77263c6bc5992c4629c4e7cdd
4
- data.tar.gz: b4cf056a674cc2dd1ecbee69a663ca5f09e284d19a12be14ad8ccf8159d53d42
3
+ metadata.gz: 5c6a12e6aed6332bab0729841ef59f95889de1a2b29835b61e4262a41160a193
4
+ data.tar.gz: 595b111f04f4ce44b4d49ecd1e7f02facb44c2c9446501af403f48679335bf94
5
5
  SHA512:
6
- metadata.gz: 3da991606dec33d2cd30ce6135a52630e6873d04aac93590b450ac167699c1a3448e7bef509666280400f7f2286c0167abb6aed0c44298fa63bb3762fdd6c913
7
- data.tar.gz: 26f707cbd3095e2170055a757fc37b03933e768604121ea87d64ff079346897b49278b713e87e3b5e8e32d51cc51ce187b2cbb62a5027e0ed1014b66a2a91df4
6
+ metadata.gz: 6c27e7c8d5350b9231cbfbe0ee68a133de45f5287b6a5a61772ff8ecbcd5c05a3cbc2d1d6851913900be0c2b04cb9b029d7b2a2671c0ee5e89dc0de24aa317c4
7
+ data.tar.gz: 38450ab30ec18a34a0019134b2e1585fc8d28390596ef9d922caadc7f2cb1c14a1ba5f3a9699a9cf62b186eaec64a7f82de30c6216d2990e9cef42c073cf8bf5
@@ -97,16 +97,18 @@ module AsciidoctorDitaMap
97
97
  end
98
98
 
99
99
  if map.title and @opts[:title]
100
- xml_title = xml_root.add_element('title')
100
+ xml_title = xml_root.add_element('title')
101
101
  xml_title.add REXML::Text.new(map.title, false, nil, true)
102
102
  end
103
103
 
104
104
  if @opts[:self] and file
105
- xml_self = xml_root.add_element('topicref')
106
- compose_topicref_attributes(xml_self, { :target => file }, map.title, map.type)
107
- stack = [{ :offset => 0, :element => xml_self }]
105
+ file_info = map.chunk ? { :target => file, :chunk => 'to-content' } : { :target => file }
106
+ xml_self = xml_root.add_element('topicref')
107
+ compose_topicref_attributes(xml_self, file_info, map.title, map.type)
108
+
109
+ stack = [{ :offset => 0, :element => xml_self }]
108
110
  else
109
- stack = [{ :offset => 0, :element => xml_root }]
111
+ stack = [{ :offset => 0, :element => xml_root }]
110
112
  end
111
113
 
112
114
  map.includes.each do |file_info|
data/lib/dita-map/map.rb CHANGED
@@ -27,7 +27,7 @@ require_relative 'topic'
27
27
 
28
28
  module AsciidoctorDitaMap
29
29
  class Map < Topic
30
- attr_accessor :id, :includes
30
+ attr_accessor :chunk, :id, :includes
31
31
 
32
32
  def initialize input, base_dir, attributes = []
33
33
  if input.empty?
@@ -35,6 +35,7 @@ module AsciidoctorDitaMap
35
35
  @title = nil
36
36
  @type = nil
37
37
  @includes = []
38
+ @chunk = false
38
39
  else
39
40
  Asciidoctor::Extensions.register do
40
41
  include_processor CatalogIncludeDirectives
@@ -46,6 +47,7 @@ module AsciidoctorDitaMap
46
47
  @id = doc.id ? doc.id.gsub(/["']/, '') : nil
47
48
  @title = doc.title ? doc.title.gsub(/<[^>]*>/, '') : nil
48
49
  @type = get_content_type doc.attributes
50
+ @chunk = doc.attributes.key? 'chunk-to-content'
49
51
  end
50
52
  end
51
53
  end
@@ -25,5 +25,5 @@
25
25
 
26
26
  module AsciidoctorDitaMap
27
27
  NAME = 'dita-map'
28
- VERSION = '0.9.11'
28
+ VERSION = '0.9.12'
29
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-dita-map
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.11
4
+ version: 0.9.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaromir Hradilek
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  requirements: []
147
- rubygems_version: 4.0.15
147
+ rubygems_version: 4.0.18
148
148
  specification_version: 4
149
149
  summary: Convert an AsciiDoc file to a DITA map
150
150
  test_files: []