asciidoctor-pdf 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2109e7ec140c759820252d4c7f0f155c2d7bf4adfcad9d34fddb8cf4bc81a260
|
4
|
+
data.tar.gz: c18e3fb15231f968d907fc05693f6c4d7f9fbedfd29e368b0dc355f44d2e4254
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e51a465c863440441cae24e429bbf84d9fb782e2c711958d5b72dfa585ba4b1b7c9c94b92d8155b2cea0d72eec276fac6e4669ea8a50c175ff8ed82ab91eb8d
|
7
|
+
data.tar.gz: a62b653261f3194d51a738cc4b1cf46f4a78a6ba0c1687fbeb06bf5049ecc9d65a20edd7acc463a2f4b473d1248795ce39902b214b87b019cbc8485d394a32f3
|
data/CHANGELOG.adoc
CHANGED
@@ -5,6 +5,18 @@
|
|
5
5
|
This document provides a high-level view of the changes to the {project-name} by release.
|
6
6
|
For a detailed view of what has changed, refer to the {url-repo}/commits/main[commit history] on GitHub.
|
7
7
|
|
8
|
+
== 2.1.2 (2022-06-17) - @mojavelinux
|
9
|
+
|
10
|
+
Bug Fixes::
|
11
|
+
|
12
|
+
* apply page layout from main document to new page in scratch document (#2248)
|
13
|
+
* use correct logic to insert page before TOC with automatic placement when doctype=book and media=prepress
|
14
|
+
* use `get_entries_for_toc` to determine if the TOC is non-empty rather than `Document#sections?`
|
15
|
+
|
16
|
+
=== Details
|
17
|
+
|
18
|
+
{url-repo}/releases/tag/v2.1.2[git tag] | {url-repo}/compare/v2.1.1\...v2.1.2[full diff]
|
19
|
+
|
8
20
|
== 2.1.1 (2022-06-15) - @mojavelinux
|
9
21
|
|
10
22
|
Improvements::
|
data/README.adoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= Asciidoctor PDF: A native PDF converter for AsciiDoc
|
2
2
|
Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
|
3
|
-
v2.1.
|
3
|
+
v2.1.2, 2022-06-17
|
4
4
|
// Settings:
|
5
5
|
:experimental:
|
6
6
|
:idprefix:
|
@@ -198,8 +198,8 @@ module Asciidoctor
|
|
198
198
|
|
199
199
|
indent_section do
|
200
200
|
toc_num_levels = (doc.attr 'toclevels', 2).to_i
|
201
|
-
if (insert_toc = (doc.attr? 'toc') && !((toc_placement = doc.attr 'toc-placement') == 'macro' || toc_placement == 'preamble') && doc.
|
202
|
-
|
201
|
+
if (insert_toc = (doc.attr? 'toc') && !((toc_placement = doc.attr 'toc-placement') == 'macro' || toc_placement == 'preamble') && !(get_entries_for_toc doc).empty?)
|
202
|
+
start_new_page if @ppbook && verso_page?
|
203
203
|
add_dest_for_block doc, id: 'toc', y: (at_page_top? ? page_height : nil)
|
204
204
|
@toc_extent = allocate_toc doc, toc_num_levels, cursor, title_page_on
|
205
205
|
else
|
@@ -2352,7 +2352,7 @@ module Asciidoctor
|
|
2352
2352
|
# NOTE: only allow document to have a single managed toc
|
2353
2353
|
return if @toc_extent
|
2354
2354
|
is_macro = (placement = opts[:placement] || 'macro') == 'macro'
|
2355
|
-
if ((doc = node.document).attr? 'toc-placement', placement) && (doc.attr? 'toc') && doc.
|
2355
|
+
if ((doc = node.document).attr? 'toc-placement', placement) && (doc.attr? 'toc') && !(get_entries_for_toc doc).empty?
|
2356
2356
|
start_toc_page node, placement if (is_book = doc.doctype == 'book')
|
2357
2357
|
add_dest_for_block node, id: (node.id || 'toc') if is_macro
|
2358
2358
|
toc_extent = @toc_extent = allocate_toc doc, (doc.attr 'toclevels', 2).to_i, cursor, (title_page_on = is_book || (doc.attr? 'title-page'))
|
@@ -2802,13 +2802,7 @@ module Asciidoctor
|
|
2802
2802
|
value = (value.split LF).delete_if {|line| SimpleAttributeRefRx.match? line }.join LF if opts[:drop_lines_with_unresolved_attributes] && (value.include? '{')
|
2803
2803
|
value = value.gsub '\{', '{' if escaped_attr_ref
|
2804
2804
|
doc.set_attr 'attribute-missing', attribute_missing unless attribute_missing == 'skip'
|
2805
|
-
if imagesdir
|
2806
|
-
if imagesdir_to_restore
|
2807
|
-
doc.set_attr 'imagesdir', imagesdir_to_restore
|
2808
|
-
else
|
2809
|
-
doc.remove_attr 'imagesdir'
|
2810
|
-
end
|
2811
|
-
end
|
2805
|
+
imagesdir_to_restore ? (doc.set_attr 'imagesdir', imagesdir_to_restore) : (doc.remove_attr 'imagesdir') if imagesdir
|
2812
2806
|
value
|
2813
2807
|
end
|
2814
2808
|
|
@@ -1149,7 +1149,7 @@ module Asciidoctor
|
|
1149
1149
|
#
|
1150
1150
|
# Returns an Extent or ScratchExtent object that describes the bounds of the content block.
|
1151
1151
|
def dry_run keep_together: nil, pages_advanced: 0, single_page: nil, onto: nil, &block
|
1152
|
-
(scratch_pdf = scratch).start_new_page
|
1152
|
+
(scratch_pdf = scratch).start_new_page layout: page.layout
|
1153
1153
|
saved_bounds = scratch_pdf.bounds
|
1154
1154
|
scratch_pdf.bounds = bounds.dup.tap do |bounds_copy|
|
1155
1155
|
bounds_copy.instance_variable_set :@document, scratch_pdf
|
@@ -96,7 +96,7 @@ module Asciidoctor
|
|
96
96
|
}.compact,
|
97
97
|
}
|
98
98
|
@theme_settings.tap do |accum|
|
99
|
-
|
99
|
+
roles_with_styles = [].to_set
|
100
100
|
theme.each_pair do |key, val|
|
101
101
|
next unless (key = key.to_s).start_with? 'role_'
|
102
102
|
role, key = (key.slice 5, key.length).split '_', 2
|
@@ -110,10 +110,10 @@ module Asciidoctor
|
|
110
110
|
# (accum[role] ||= {})[:kerning] = resolved_val
|
111
111
|
# end
|
112
112
|
elsif key == 'font_style' || key == 'text_decoration'
|
113
|
-
|
113
|
+
roles_with_styles << role
|
114
114
|
end
|
115
115
|
end
|
116
|
-
|
116
|
+
roles_with_styles.each do |role|
|
117
117
|
(accum[role] ||= {})[:styles] = to_styles theme[%(role_#{role}_font_style)], theme[%(role_#{role}_text_decoration)]
|
118
118
|
end
|
119
119
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asciidoctor-pdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Allen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-06-
|
12
|
+
date: 2022-06-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: asciidoctor
|