asciidoctor-dita-map 0.9.12 → 0.9.13

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: 5c6a12e6aed6332bab0729841ef59f95889de1a2b29835b61e4262a41160a193
4
- data.tar.gz: 595b111f04f4ce44b4d49ecd1e7f02facb44c2c9446501af403f48679335bf94
3
+ metadata.gz: 98bea8d9cbc76880ed050644d87dba51910d7e7ac722fdf04449d4b53743e7fd
4
+ data.tar.gz: e96e393535d5212e2f786b77baa6a182eb81874bc64e11d3e9c8d63ac823fdfe
5
5
  SHA512:
6
- metadata.gz: 6c27e7c8d5350b9231cbfbe0ee68a133de45f5287b6a5a61772ff8ecbcd5c05a3cbc2d1d6851913900be0c2b04cb9b029d7b2a2671c0ee5e89dc0de24aa317c4
7
- data.tar.gz: 38450ab30ec18a34a0019134b2e1585fc8d28390596ef9d922caadc7f2cb1c14a1ba5f3a9699a9cf62b186eaec64a7f82de30c6216d2990e9cef42c073cf8bf5
6
+ metadata.gz: 217aa01cb9a704bc51e7bef39f6e36b263d9f0a7e7d7678f084feabebb2e2c8db84af43b1e0d97009fe4c9944da9d939fc9b35f6aa49a4a3c777b0bbb6f63cb7
7
+ data.tar.gz: 9646161ae41f05054b8ff31474128464299d5c948150927a5b550223593302bf8163571dc8323c46e51424de37c61fa5010be54f3ef97437a94b2e51038523b2
@@ -102,13 +102,16 @@ module AsciidoctorDitaMap
102
102
  end
103
103
 
104
104
  if @opts[:self] and file
105
- file_info = map.chunk ? { :target => file, :chunk => 'to-content' } : { :target => file }
106
105
  xml_self = xml_root.add_element('topicref')
106
+ file_info = { :target => file }
107
+ file_info[:chunk] = 'to-content' if map.chunk
108
+ file_info[:navtitle] = map.navtitle
109
+
107
110
  compose_topicref_attributes(xml_self, file_info, map.title, map.type)
108
111
 
109
- stack = [{ :offset => 0, :element => xml_self }]
112
+ stack = [{ :offset => 0, :element => xml_self }]
110
113
  else
111
- stack = [{ :offset => 0, :element => xml_root }]
114
+ stack = [{ :offset => 0, :element => xml_root }]
112
115
  end
113
116
 
114
117
  map.includes.each do |file_info|
data/lib/dita-map/map.rb CHANGED
@@ -27,12 +27,13 @@ require_relative 'topic'
27
27
 
28
28
  module AsciidoctorDitaMap
29
29
  class Map < Topic
30
- attr_accessor :chunk, :id, :includes
30
+ attr_accessor :chunk, :id, :includes, :navtitle
31
31
 
32
32
  def initialize input, base_dir, attributes = []
33
33
  if input.empty?
34
34
  @id = nil
35
35
  @title = nil
36
+ @navtitle = nil
36
37
  @type = nil
37
38
  @includes = []
38
39
  @chunk = false
@@ -46,6 +47,7 @@ module AsciidoctorDitaMap
46
47
  @includes = doc.catalog[:include_files] ? doc.catalog[:include_files] : []
47
48
  @id = doc.id ? doc.id.gsub(/["']/, '') : nil
48
49
  @title = doc.title ? doc.title.gsub(/<[^>]*>/, '') : nil
50
+ @navtitle = (doc.attributes.key? 'navtitle') ? doc.attributes['navtitle'] : nil
49
51
  @type = get_content_type doc.attributes
50
52
  @chunk = doc.attributes.key? 'chunk-to-content'
51
53
  end
@@ -25,5 +25,5 @@
25
25
 
26
26
  module AsciidoctorDitaMap
27
27
  NAME = 'dita-map'
28
- VERSION = '0.9.12'
28
+ VERSION = '0.9.13'
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.12
4
+ version: 0.9.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaromir Hradilek