asciidoctor-pdf 2.3.23 → 2.3.24
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/CHANGELOG.adoc +13 -0
- data/README.adoc +1 -1
- data/data/fonts/notosans-regular-subset.ttf +0 -0
- data/data/fonts/notoserif-regular-subset.ttf +0 -0
- data/lib/asciidoctor/pdf/converter.rb +18 -6
- data/lib/asciidoctor/pdf/ext/prawn/extensions.rb +4 -1
- data/lib/asciidoctor/pdf/version.rb +1 -1
- 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: 274287402a150ddf26c07f844b1d07cad1e43a7d5174c06c24837564b1da1965
|
|
4
|
+
data.tar.gz: d6039b200512a3e2e3bafe40ec8cb0673694920ebf118fb29b8954e0d0f27d3e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 030d61aacae9e4327b059bd99690ace9b4d136be54da1ce4715695186e9526589ab43b8d9bf689093c57bd572e4668d09b9b5ac41c5b42b9c48db97d9722335e
|
|
7
|
+
data.tar.gz: af263cfd0d458918f28e9b4ab4a5f79d404e5645fd95e060d055d24429fd7057422886e580c5def7e906a48a1f760f877284dcdfb48ff425e32af37aae5637ee
|
data/CHANGELOG.adoc
CHANGED
|
@@ -5,6 +5,19 @@
|
|
|
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.3.24 (2025-11-15) - @mojavelinux
|
|
9
|
+
|
|
10
|
+
Improvements::
|
|
11
|
+
|
|
12
|
+
* bypass any dry run logic if remaining height on page is less than heading font size
|
|
13
|
+
* update import_page method on converter to return true if page was imported (nil otherwise), on par with the functionality of method it replaces
|
|
14
|
+
* limit min toclevels value so it does not cause TOC to be empty (#2619)
|
|
15
|
+
* add checkmark glyph (U+2713) to prose fonts (Noto Serif and Noto Sans) to avoid need for fallback font (#2617)
|
|
16
|
+
|
|
17
|
+
=== Details
|
|
18
|
+
|
|
19
|
+
{url-repo}/releases/tag/v2.3.24[git tag] | {url-repo}/compare/v2.3.23\...v2.3.24[full diff]
|
|
20
|
+
|
|
8
21
|
== 2.3.23 (2025-10-26) - @mojavelinux
|
|
9
22
|
|
|
10
23
|
Bug Fixes::
|
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.3.
|
|
3
|
+
v2.3.24, 2025-11-15
|
|
4
4
|
// Settings:
|
|
5
5
|
:experimental:
|
|
6
6
|
:idprefix:
|
|
Binary file
|
|
Binary file
|
|
@@ -195,10 +195,10 @@ module Asciidoctor
|
|
|
195
195
|
end if doc.header? && !doc.notitle
|
|
196
196
|
end
|
|
197
197
|
|
|
198
|
-
num_front_matter_pages = toc_page_nums =
|
|
198
|
+
num_front_matter_pages = toc_page_nums = nil
|
|
199
199
|
|
|
200
|
+
toc_num_levels = resolve_toclevels doc
|
|
200
201
|
indent_section do
|
|
201
|
-
toc_num_levels = (doc.attr 'toclevels', 2).to_i
|
|
202
202
|
if (toc_at_top = (doc.attr? 'toc') && !((toc_placement = doc.attr 'toc-placement') == 'macro' || toc_placement == 'preamble') && !(get_entries_for_toc doc).empty?)
|
|
203
203
|
start_new_page if @ppbook && verso_page?
|
|
204
204
|
add_dest_for_block doc, id: 'toc', y: (at_page_top? ? page_height : nil)
|
|
@@ -2423,7 +2423,7 @@ module Asciidoctor
|
|
|
2423
2423
|
if ((doc = node.document).attr? 'toc-placement', placement) && (doc.attr? 'toc') && !(get_entries_for_toc doc).empty?
|
|
2424
2424
|
start_toc_page node, placement if (is_book = doc.doctype == 'book')
|
|
2425
2425
|
add_dest_for_block node, id: (node.id || 'toc') if is_macro
|
|
2426
|
-
toc_extent = @toc_extent = allocate_toc doc, (doc
|
|
2426
|
+
toc_extent = @toc_extent = allocate_toc doc, (resolve_toclevels doc), cursor, (title_as_page = is_book || (doc.attr? 'title-page'))
|
|
2427
2427
|
if title_as_page
|
|
2428
2428
|
if @theme.page_numbering_start_at == 'toc'
|
|
2429
2429
|
@index.start_page_number = toc_extent.from.page
|
|
@@ -2815,7 +2815,7 @@ module Asciidoctor
|
|
|
2815
2815
|
if ::String === num_levels
|
|
2816
2816
|
if num_levels.include? ':'
|
|
2817
2817
|
num_levels, expand_levels = num_levels.split ':', 2
|
|
2818
|
-
num_levels = num_levels.empty? ? (doc
|
|
2818
|
+
num_levels = num_levels.empty? ? (resolve_toclevels doc) : num_levels.to_i
|
|
2819
2819
|
expand_levels = expand_levels.to_i
|
|
2820
2820
|
else
|
|
2821
2821
|
num_levels = expand_levels = num_levels.to_i
|
|
@@ -2910,6 +2910,11 @@ module Asciidoctor
|
|
|
2910
2910
|
# the next page. This method is not called if the cursor is already at the top of the page or
|
|
2911
2911
|
# whether this node has no node that follows it in document order.
|
|
2912
2912
|
def arrange_heading node, title, opts
|
|
2913
|
+
# quick optimization if font size itself won't fit in remaining space
|
|
2914
|
+
unless theme_font(:heading, level: (hlevel = opts[:level])) { font_size <= cursor }
|
|
2915
|
+
advance_page
|
|
2916
|
+
return
|
|
2917
|
+
end
|
|
2913
2918
|
if (min_height_after = @theme.heading_min_height_after) == 'auto' || (node.option? 'breakable')
|
|
2914
2919
|
orphaned = nil
|
|
2915
2920
|
doc = node.document
|
|
@@ -2917,7 +2922,7 @@ module Asciidoctor
|
|
|
2917
2922
|
dry_run single_page: true do
|
|
2918
2923
|
push_scratch doc
|
|
2919
2924
|
start_page_number ||= page_number # block will be restarted if first attempt fails
|
|
2920
|
-
theme_font :heading, level:
|
|
2925
|
+
theme_font :heading, level: hlevel do
|
|
2921
2926
|
if opts[:part]
|
|
2922
2927
|
ink_part_title node, title, opts
|
|
2923
2928
|
elsif opts[:chapterlike]
|
|
@@ -2937,7 +2942,7 @@ module Asciidoctor
|
|
|
2937
2942
|
end
|
|
2938
2943
|
advance_page if orphaned
|
|
2939
2944
|
else
|
|
2940
|
-
theme_font :heading, level:
|
|
2945
|
+
theme_font :heading, level: hlevel do
|
|
2941
2946
|
if (space_below = ::Numeric === min_height_after ? min_height_after : 0) > 0 && (node.context == :section ? node.blocks? : !node.last_child?)
|
|
2942
2947
|
space_below += @theme[%(heading_h#{hlevel}_margin_bottom)] || @theme.heading_margin_bottom
|
|
2943
2948
|
else
|
|
@@ -3928,6 +3933,13 @@ module Asciidoctor
|
|
|
3928
3933
|
node.sections
|
|
3929
3934
|
end
|
|
3930
3935
|
|
|
3936
|
+
def resolve_toclevels doc
|
|
3937
|
+
if (toc_num_levels = (doc.attr 'toclevels', 2).to_i) < 1
|
|
3938
|
+
toc_num_levels = doc.doctype == 'book' && doc.sections.find {|s| s.sectname == 'part' } ? 0 : 1
|
|
3939
|
+
end
|
|
3940
|
+
toc_num_levels
|
|
3941
|
+
end
|
|
3942
|
+
|
|
3931
3943
|
# NOTE: num_front_matter_pages not used during a dry run
|
|
3932
3944
|
def ink_toc doc, num_levels, toc_page_number, start_cursor, num_front_matter_pages = 0
|
|
3933
3945
|
go_to_page toc_page_number unless (page_number == toc_page_number) || scratch?
|
|
@@ -891,6 +891,8 @@ module Asciidoctor
|
|
|
891
891
|
# However, due to how page creation works in Prawn, understand that advancing
|
|
892
892
|
# to the next page is necessary to prevent the size & layout of the imported
|
|
893
893
|
# page from affecting a newly created page.
|
|
894
|
+
#
|
|
895
|
+
# Returns a Boolean indicating whether the page to import exists and was imported.
|
|
894
896
|
def import_page file, options = {}
|
|
895
897
|
prev_page_layout = page.layout
|
|
896
898
|
prev_page_size = page.size
|
|
@@ -912,6 +914,7 @@ module Asciidoctor
|
|
|
912
914
|
advance_page layout: prev_page_layout, margin: prev_page_margin, size: prev_page_size
|
|
913
915
|
(@bounding_box = prev_bounds).reset_top if ColumnBox === prev_bounds
|
|
914
916
|
end
|
|
917
|
+
imported = true
|
|
915
918
|
elsif options.fetch :advance_if_missing, true
|
|
916
919
|
delete_current_page
|
|
917
920
|
# NOTE: see previous comment
|
|
@@ -920,7 +923,7 @@ module Asciidoctor
|
|
|
920
923
|
else
|
|
921
924
|
delete_current_page
|
|
922
925
|
end
|
|
923
|
-
|
|
926
|
+
imported
|
|
924
927
|
end
|
|
925
928
|
|
|
926
929
|
# Create a new page for the specified image.
|
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.3.
|
|
4
|
+
version: 2.3.24
|
|
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: 2025-
|
|
12
|
+
date: 2025-11-15 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: asciidoctor
|