asciidoctor-multipage 0.0.13 → 0.0.14
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 +17 -8
- 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: ab1f550130f59f72549c38e53b85073052489f9447e9dcfd1122e3ffbc418c8e
|
4
|
+
data.tar.gz: 1984fe6907d211571d822451c90725984c14d22c993195508d6e6992d29ce333
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4566ce596a05c9a60866138d7ef8946121bef05d95648a14a304312a4a632ebcd85dbc077eeff045ef0d94d48b85064d8e15d438e9eb84d19ee4f432177f5b9c
|
7
|
+
data.tar.gz: 9652cb173af11948e16c3ed1d463922f88a233c4118c044ec2b2005095f9b3c9d0478c6f4d5967ff4f3f1b9b4149b709c68932684f21cdf3cc60e12bf68f3d6f
|
@@ -262,14 +262,14 @@ class MultipageHtml5Converter < Asciidoctor::Converter::Html5Converter
|
|
262
262
|
# NOTE: There are some non-breaking spaces (U+00A0) below, in
|
263
263
|
# the "links <<" lines and "links.join" line.
|
264
264
|
if previous_page != parent_page
|
265
|
-
links << %(← #{doc.attr('multipage-nav-previous-label') || "Previous"}: <<#{previous_page.id}>>)
|
265
|
+
links << %(← #{doc.attr('multipage-nav-previous-label') || "Previous"}: <<#{previous_page.id},#{previous_page.captioned_title}>>)
|
266
266
|
end
|
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
|
267
|
+
links << %(↑ #{doc.attr('multipage-nav-up-label') || "Up"}: <<#{parent_page.id},#{parent_page.captioned_title}>>)
|
268
|
+
links << %(⌂ #{doc.attr('multipage-nav-home-label') || "Home"}: <<#{home_page.id},#{home_page.captioned_title}>>) if home_page != parent_page
|
269
269
|
end
|
270
270
|
if page_index != pages.length-1
|
271
271
|
next_page = pages[page_index+1]
|
272
|
-
links << %(#{doc.attr('multipage-nav-next-label') || "Next"}: <<#{next_page.id}>> →)
|
272
|
+
links << %(#{doc.attr('multipage-nav-next-label') || "Next"}: <<#{next_page.id},#{next_page.captioned_title}>> →)
|
273
273
|
end
|
274
274
|
block = Asciidoctor::Block.new(parent = doc,
|
275
275
|
context = :paragraph,
|
@@ -356,9 +356,17 @@ class MultipageHtml5Converter < Asciidoctor::Converter::Html5Converter
|
|
356
356
|
else
|
357
357
|
attrs = node.role ? %( class="#{node.role}") : ''
|
358
358
|
unless (text = node.text)
|
359
|
-
refid = node.attributes['refid']
|
360
|
-
|
361
|
-
|
359
|
+
if AbstractNode === (ref = (@refs ||= node.document.catalog[:refs])[refid = node.attributes['refid']] || (refid.nil_or_empty? ? (top = get_root_document node) : nil))
|
360
|
+
if (@resolving_xref ||= (outer = true)) && outer
|
361
|
+
if (text = ref.xreftext node.attr 'xrefstyle', nil, true)
|
362
|
+
text = text.gsub DropAnchorRx, '' if text.include? '<a'
|
363
|
+
else
|
364
|
+
text = top ? '[^top]' : %([#{refid}])
|
365
|
+
end
|
366
|
+
@resolving_xref = nil
|
367
|
+
else
|
368
|
+
text = top ? '[^top]' : %([#{refid}])
|
369
|
+
end
|
362
370
|
else
|
363
371
|
text = %([#{refid}])
|
364
372
|
end
|
@@ -396,7 +404,7 @@ class MultipageHtml5Converter < Asciidoctor::Converter::Html5Converter
|
|
396
404
|
# applicable for the current page.
|
397
405
|
def new_outline_doc(node, new_parent:nil, for_page:nil)
|
398
406
|
if node.class == Document
|
399
|
-
new_document = Document.new([])
|
407
|
+
new_document = Document.new([], {:doctype => node.doctype})
|
400
408
|
new_document.mplevel = node.mplevel
|
401
409
|
new_document.id = node.id
|
402
410
|
new_document.update_attributes(node.attributes)
|
@@ -413,6 +421,7 @@ class MultipageHtml5Converter < Asciidoctor::Converter::Html5Converter
|
|
413
421
|
level = node.level,
|
414
422
|
numbered = node.numbered)
|
415
423
|
new_section.id = node.id
|
424
|
+
new_section.sectname = node.sectname
|
416
425
|
new_section.caption = node.caption
|
417
426
|
new_section.title = node.instance_variable_get(:@title)
|
418
427
|
new_section.mplevel = node.mplevel
|
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.14
|
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-09-
|
11
|
+
date: 2021-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appraisal
|