asciidoctor-multipage 0.0.6 → 0.0.7

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/asciidoctor-multipage.rb +13 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1536862b822c7ec9f66f5f53f3b6a9bad7f6983ee5ff1f5c742e718a3cb66a76
4
- data.tar.gz: f612e848167857d28c7c42f4684355e7082a45379038a5265e472797dae99b11
3
+ metadata.gz: d30d8cf7b55d2e9eac4264bcaf1eb908a2e82b22de1446a4003a889c482a8e56
4
+ data.tar.gz: 62f1b710405e4fb9fd680720a4d670069761181a369b541c65a7bda50da6733f
5
5
  SHA512:
6
- metadata.gz: c652de15f77d2c32e7574b7edf9351e49623170aada76a8c577b16ade65db6294660fb07dbebe27095b5500167c804a4a3ac70d82383d3d56a84ca9d4c1aeed8
7
- data.tar.gz: 8db9f9e909ae211891384483624affd6f7c78ada48d78c27b7bb1667c5da4300ab3bc257c233912c1495505d412a7402275579f569bd3524e6f7011f1debb4f2
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
- stitle = %(#{section.sectnum} #{section.title})
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.6
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-27 00:00:00.000000000 Z
11
+ date: 2021-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appraisal