asciidoctor-multipage 0.0.12 → 0.0.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 +4 -4
- data/lib/asciidoctor-multipage.rb +8 -15
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f3969d1ba0eb1078d827fb24791759e87a66f646c0de7bbe2a88d8937d4cda5a
|
|
4
|
+
data.tar.gz: b7bce56dee751a9e13b16cd6eeba2939aad51e98bf8f2090d7e5780b0c381251
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5966efde3e3d4728a5ff2f65d381d89d7f0e2d81c18ec7bc647b2f02bf2d9fee5aef190f321e1573ac61b33a629f4204de3f40fabd234fd0a77c85eec8528ec0
|
|
7
|
+
data.tar.gz: ccf9339527d9cf6c9876e5317349e7ce6ea4ba3fed445becee5c1bcbc62efd5a20304095de59e4c467057952222906baf105b332053c20c1de88ee558d7de4aa
|
|
@@ -85,17 +85,11 @@ class Asciidoctor::Section
|
|
|
85
85
|
# Sections. The sectnum is saved in section() below.
|
|
86
86
|
def sectnum(delimiter = '.', append = nil)
|
|
87
87
|
append ||= (append == false ? '' : delimiter)
|
|
88
|
-
if @level ==
|
|
89
|
-
|
|
90
|
-
elsif @level > 1
|
|
91
|
-
if @parent.class == Asciidoctor::Section ||
|
|
92
|
-
(@mplevel && @parent.class == Asciidoctor::Document)
|
|
88
|
+
if @level > 1 and @parent.class == Asciidoctor::Section ||
|
|
89
|
+
(@mplevel && @parent.class == Asciidoctor::Document)
|
|
93
90
|
%(#{@parent.sectnum(delimiter)}#{@numeral}#{append})
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
end
|
|
97
|
-
else # @level == 0
|
|
98
|
-
%(#{Asciidoctor::Helpers.int_to_roman @numeral}#{append})
|
|
91
|
+
else
|
|
92
|
+
%(#{@numeral}#{append})
|
|
99
93
|
end
|
|
100
94
|
end
|
|
101
95
|
end
|
|
@@ -268,14 +262,14 @@ class MultipageHtml5Converter < Asciidoctor::Converter::Html5Converter
|
|
|
268
262
|
# NOTE: There are some non-breaking spaces (U+00A0) below, in
|
|
269
263
|
# the "links <<" lines and "links.join" line.
|
|
270
264
|
if previous_page != parent_page
|
|
271
|
-
links << %(← Previous: <<#{previous_page.id}>>)
|
|
265
|
+
links << %(← #{doc.attr('multipage-nav-previous-label') || "Previous"}: <<#{previous_page.id}>>)
|
|
272
266
|
end
|
|
273
|
-
links << %(↑ Up: <<#{parent_page.id}>>)
|
|
274
|
-
links << %(⌂ Home: <<#{home_page.id}>>) if home_page != parent_page
|
|
267
|
+
links << %(↑ #{doc.attr('multipage-nav-up-label') || "Up"}: <<#{parent_page.id}>>)
|
|
268
|
+
links << %(⌂ #{doc.attr('multipage-nav-home-label') || "Home"}: <<#{home_page.id}>>) if home_page != parent_page
|
|
275
269
|
end
|
|
276
270
|
if page_index != pages.length-1
|
|
277
271
|
next_page = pages[page_index+1]
|
|
278
|
-
links << %(Next: <<#{next_page.id}>> →)
|
|
272
|
+
links << %(#{doc.attr('multipage-nav-next-label') || "Next"}: <<#{next_page.id}>> →)
|
|
279
273
|
end
|
|
280
274
|
block = Asciidoctor::Block.new(parent = doc,
|
|
281
275
|
context = :paragraph,
|
|
@@ -584,7 +578,6 @@ class MultipageHtml5Converter < Asciidoctor::Converter::Html5Converter
|
|
|
584
578
|
# Write remaining part/chapter pages
|
|
585
579
|
outdir = ::File.dirname(target)
|
|
586
580
|
ext = ::File.extname(target)
|
|
587
|
-
target_name = ::File.basename(target, ext)
|
|
588
581
|
@pages.each do |doc|
|
|
589
582
|
chapter_target = doc.id + ext
|
|
590
583
|
outfile = ::File.join(outdir, chapter_target)
|
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.13
|
|
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-
|
|
11
|
+
date: 2021-09-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: appraisal
|
|
@@ -116,8 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
117
|
version: '0'
|
|
118
118
|
requirements: []
|
|
119
|
-
|
|
120
|
-
rubygems_version: 2.7.6.2
|
|
119
|
+
rubygems_version: 3.2.5
|
|
121
120
|
signing_key:
|
|
122
121
|
specification_version: 4
|
|
123
122
|
summary: Asciidoctor multipage HTML output extension
|