asciidoctor-multipage 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor-multipage.rb +13 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d30d8cf7b55d2e9eac4264bcaf1eb908a2e82b22de1446a4003a889c482a8e56
|
4
|
+
data.tar.gz: 62f1b710405e4fb9fd680720a4d670069761181a369b541c65a7bda50da6733f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec8fc0473fe24f5e10112b4aac65f28fa5a23491e8edabfa8581b54f926201dbeefb3991ec0c1bd1d8fa0f62a1806dd95b610ed0497248c27e53db26e1894f3a
|
7
|
+
data.tar.gz: c50107b5d4a5b5d1349b99b72da9458ddb011469146f9a5a36516fda2fc6f3667881afe942fd6465bebebaf174c883971b305fdcfb67b3424878e590ecd1e928
|
@@ -244,6 +244,7 @@ class MultipageHtml5Converter < Asciidoctor::Converter::Html5Converter
|
|
244
244
|
# Generate the actual HTML outline for the TOC. This method is analogous to
|
245
245
|
# Html5Converter convert_outline().
|
246
246
|
def generate_outline(node, opts = {})
|
247
|
+
# Do the same as Html5Converter convert_outline() here
|
247
248
|
return unless node.sections?
|
248
249
|
sectnumlevels = opts[:sectnumlevels] || (node.document.attributes['sectnumlevels'] || 3).to_i
|
249
250
|
toclevels = opts[:toclevels] || (node.document.attributes['toclevels'] || 2).to_i
|
@@ -254,7 +255,17 @@ class MultipageHtml5Converter < Asciidoctor::Converter::Html5Converter
|
|
254
255
|
if section.caption
|
255
256
|
stitle = section.captioned_title
|
256
257
|
elsif section.numbered && slevel <= sectnumlevels
|
257
|
-
|
258
|
+
if slevel < 2 && node.document.doctype == 'book'
|
259
|
+
if section.sectname == 'chapter'
|
260
|
+
stitle = %(#{(signifier = node.document.attributes['chapter-signifier']) ? "#{signifier} " : ''}#{section.sectnum} #{section.title})
|
261
|
+
elsif section.sectname == 'part'
|
262
|
+
stitle = %(#{(signifier = node.document.attributes['part-signifier']) ? "#{signifier} " : ''}#{section.sectnum nil, ':'} #{section.title})
|
263
|
+
else
|
264
|
+
stitle = %(#{section.sectnum} #{section.title})
|
265
|
+
end
|
266
|
+
else
|
267
|
+
stitle = %(#{section.sectnum} #{section.title})
|
268
|
+
end
|
258
269
|
else
|
259
270
|
stitle = section.title
|
260
271
|
end
|
@@ -365,7 +376,7 @@ class MultipageHtml5Converter < Asciidoctor::Converter::Html5Converter
|
|
365
376
|
numbered = node.numbered)
|
366
377
|
new_section.id = node.id
|
367
378
|
new_section.caption = node.caption
|
368
|
-
new_section.title = node.title
|
379
|
+
new_section.title = node.instance_variable_get(:@title)
|
369
380
|
new_section.mplevel = node.mplevel
|
370
381
|
new_parent << new_section
|
371
382
|
new_parent.sections.last.numeral = node.numeral
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asciidoctor-multipage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Owen T. Heisler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appraisal
|