asciidoctor-pdf 2.3.8 → 2.3.10
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 +26 -1
- data/README.adoc +1 -1
- data/lib/asciidoctor/pdf/converter.rb +27 -21
- data/lib/asciidoctor/pdf/ext/asciidoctor/abstract_block.rb +4 -0
- data/lib/asciidoctor/pdf/ext/core/file.rb +1 -1
- data/lib/asciidoctor/pdf/ext/prawn/extensions.rb +11 -2
- data/lib/asciidoctor/pdf/ext/prawn/font/afm.rb +1 -0
- data/lib/asciidoctor/pdf/ext/prawn/formatted_text/box.rb +13 -8
- data/lib/asciidoctor/pdf/ext/prawn-svg/elements/image.rb +1 -1
- data/lib/asciidoctor/pdf/ext/rouge/formatters/prawn.rb +1 -1
- data/lib/asciidoctor/pdf/formatted_text/transform.rb +1 -1
- data/lib/asciidoctor/pdf/optimizer.rb +1 -1
- data/lib/asciidoctor/pdf/theme_loader.rb +1 -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: 53465d3756b672a087912f7052c98da2174506d348ae415702b6ad0923c35887
|
4
|
+
data.tar.gz: 81156616786953961b86a747720fdb1c92117a7645df0faba24b02e96bec4635
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73d88491443fdafb5086bf4a122c3910631e547ef118b4ff4b23dffcbb315d7fb21a7335fc41db778b0d11bf5f851d3cae9df1b838fa342d3e5cf73cbe0f259d
|
7
|
+
data.tar.gz: cbd1fe371ed58d54c76770ef7abda45a080bb84dcbece1e5f60bda8a260668538ee5f71b92088b67ea71b9b29ed01cf6746fa9568a123366080a1e2fcdbb1c2e
|
data/CHANGELOG.adoc
CHANGED
@@ -5,6 +5,31 @@
|
|
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.10 (2023-12-04) - @mojavelinux
|
9
|
+
|
10
|
+
Bug Fixes::
|
11
|
+
|
12
|
+
* show dot leaders in TOC entry if toclevels is increased for a given section (#2441)
|
13
|
+
* decouple tests from path of PWD (#2444)
|
14
|
+
* consider inherited styles when analyzing glyphs for fallback font support (#2463)
|
15
|
+
* add fallback character for placeholder character when using AFM font (#2453)
|
16
|
+
* don't advance image that's first child of block at top of page if image is taller than page (#2012)
|
17
|
+
|
18
|
+
=== Details
|
19
|
+
|
20
|
+
{url-repo}/releases/tag/v2.3.10[git tag] | {url-repo}/compare/v2.3.9\...v2.3.10[full diff]
|
21
|
+
|
22
|
+
== 2.3.9 (2023-06-28) - @mojavelinux
|
23
|
+
|
24
|
+
Bug Fixes::
|
25
|
+
|
26
|
+
* correctly align block image in raster format in column when align is right or center and page columns are enabled (#2433)
|
27
|
+
* honor table caption end placement (`table-caption-end` theme key) when `unbreakable` (or `breakable`) option is set on table (#2434)
|
28
|
+
|
29
|
+
=== Details
|
30
|
+
|
31
|
+
{url-repo}/releases/tag/v2.3.9[git tag] | {url-repo}/compare/v2.3.8\...v2.3.9[full diff]
|
32
|
+
|
8
33
|
== 2.3.8 (2023-06-25) - @mojavelinux
|
9
34
|
|
10
35
|
Improvements::
|
@@ -14,7 +39,7 @@ Improvements::
|
|
14
39
|
|
15
40
|
Bug Fixes::
|
16
41
|
|
17
|
-
* remove null character enclosed in XML tag when
|
42
|
+
* remove null character enclosed in XML tag when sanitizing text; fixes invisible text in outline when heading contains index term (#2430)
|
18
43
|
* alias `File.exists?` to `File.exist?` when loading RGhost optimizer to patch incompatibility when using Ruby 3.2
|
19
44
|
|
20
45
|
Build / Infrastructure::
|
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.10, 2023-12-04
|
4
4
|
// Settings:
|
5
5
|
:experimental:
|
6
6
|
:idprefix:
|
@@ -377,7 +377,7 @@ module Asciidoctor
|
|
377
377
|
if (rotated_page_margin = resolve_page_margin (doc.attr 'pdf-page-margin-rotated') || theme.page_margin_rotated)
|
378
378
|
rotated_page_margin = expand_margin_value rotated_page_margin
|
379
379
|
@edge_shorthand_cache = nil
|
380
|
-
@page_margin[PageLayouts[(PageLayouts.index page.layout) - 1]] = { recto: rotated_page_margin, verso: rotated_page_margin.
|
380
|
+
@page_margin[PageLayouts[(PageLayouts.index page.layout) - 1]] = { recto: rotated_page_margin, verso: (rotated_page_margin.drop 0) }
|
381
381
|
end
|
382
382
|
if @media == 'prepress'
|
383
383
|
@ppbook = doc.doctype == 'book'
|
@@ -1048,7 +1048,7 @@ module Asciidoctor
|
|
1048
1048
|
else
|
1049
1049
|
highlighter = nil
|
1050
1050
|
end
|
1051
|
-
saved_subs = (subs = node.subs).
|
1051
|
+
saved_subs = (subs = node.subs).drop 0
|
1052
1052
|
callouts_enabled = subs.include? :callouts
|
1053
1053
|
highlight_idx = subs.index :highlight
|
1054
1054
|
# NOTE: scratch? here only applies if listing block is nested inside another block
|
@@ -1069,9 +1069,9 @@ module Asciidoctor
|
|
1069
1069
|
source_string = expand_tabs node.content
|
1070
1070
|
else
|
1071
1071
|
if callouts_enabled
|
1072
|
-
saved_lines = node.lines.
|
1072
|
+
saved_lines = node.lines.drop 0
|
1073
1073
|
subs.delete :callouts
|
1074
|
-
prev_subs = subs.
|
1074
|
+
prev_subs = subs.drop 0
|
1075
1075
|
subs.clear
|
1076
1076
|
source_string, conum_mapping = extract_conums node.content
|
1077
1077
|
node.lines.replace (source_string.split LF)
|
@@ -1421,7 +1421,7 @@ module Asciidoctor
|
|
1421
1421
|
term_inline_format = (term_font_styles = font_styles).empty? ? true : [inherited: { styles: term_font_styles }]
|
1422
1422
|
term_line_metrics = calc_line_metrics @base_line_height
|
1423
1423
|
term_padding_no_blocks = [term_line_metrics.padding_top, 10, term_line_metrics.padding_bottom, 10]
|
1424
|
-
(term_padding = term_padding_no_blocks.
|
1424
|
+
(term_padding = (term_padding_no_blocks.drop 0))[2] += @theme.prose_margin_bottom * 0.5
|
1425
1425
|
desc_padding = [0, 10, 0, 10]
|
1426
1426
|
term_kerning = default_kerning?
|
1427
1427
|
end
|
@@ -1802,7 +1802,7 @@ module Asciidoctor
|
|
1802
1802
|
end
|
1803
1803
|
# NOTE: shrink image so it fits within available space; group image & caption
|
1804
1804
|
if (rendered_h = svg_size.output_height) > (available_h = cursor - caption_h)
|
1805
|
-
unless pinned || at_page_top?
|
1805
|
+
unless pinned || at_page_top? || (node.first_child? && (node.parent.attr? 'pdf-at-top'))
|
1806
1806
|
advance_page
|
1807
1807
|
available_h = cursor - caption_h
|
1808
1808
|
end
|
@@ -1844,7 +1844,7 @@ module Asciidoctor
|
|
1844
1844
|
rendered_w, rendered_h = image_info.calc_image_dimensions width: (width || [available_w, actual_w].min)
|
1845
1845
|
# NOTE: shrink image so it fits within available space; group image & caption
|
1846
1846
|
if rendered_h > (available_h = cursor - caption_h)
|
1847
|
-
unless pinned || at_page_top?
|
1847
|
+
unless pinned || at_page_top? || (node.first_child? && (node.parent.attr? 'pdf-at-top'))
|
1848
1848
|
advance_page
|
1849
1849
|
available_h = cursor - caption_h
|
1850
1850
|
end
|
@@ -1856,9 +1856,16 @@ module Asciidoctor
|
|
1856
1856
|
update_colors if graphic_state.color_space.empty?
|
1857
1857
|
ink_caption node, category: :image, end: :top, block_align: alignment, block_width: rendered_w, max_width: caption_max_width if caption_end == :top && node.title?
|
1858
1858
|
image_y = y
|
1859
|
-
|
1859
|
+
left = bounds.left
|
1860
|
+
# NOTE: prawn does not compute :at for alignment correctly in column box, so resort to our own logic
|
1861
|
+
case alignment
|
1862
|
+
when :center
|
1863
|
+
left += (available_w - rendered_w) * 0.5
|
1864
|
+
when :right
|
1865
|
+
left += available_w - rendered_w
|
1866
|
+
end
|
1860
1867
|
# NOTE: specify both width and height to avoid recalculation
|
1861
|
-
embed_image image_obj, image_info,
|
1868
|
+
embed_image image_obj, image_info, at: [left, (image_cursor = cursor)], height: rendered_h, width: rendered_w
|
1862
1869
|
draw_image_border image_cursor, rendered_w, rendered_h, alignment unless pinned || (node.role? && (node.has_role? 'noborder'))
|
1863
1870
|
if (link = node.attr 'link')
|
1864
1871
|
add_link_to_image link, { width: rendered_w, height: rendered_h }, position: alignment, y: image_y
|
@@ -1974,6 +1981,7 @@ module Asciidoctor
|
|
1974
1981
|
end
|
1975
1982
|
|
1976
1983
|
def convert_table node
|
1984
|
+
caption_end = (theme = @theme).table_caption_end&.to_sym || :top
|
1977
1985
|
if !at_page_top? && ((unbreakable = node.option? 'unbreakable') || ((node.option? 'breakable') && (node.id || node.title?)))
|
1978
1986
|
# NOTE: we use the current node as the parent so we can navigate back into the document model
|
1979
1987
|
(table_container = Block.new node, :open) << (table_dup = node.dup)
|
@@ -1985,7 +1993,7 @@ module Asciidoctor
|
|
1985
1993
|
end
|
1986
1994
|
table_container.style = 'table-container'
|
1987
1995
|
table_container.id, table_dup.id = table_dup.id, nil
|
1988
|
-
if table_dup.title?
|
1996
|
+
if caption_end == :top && table_dup.title?
|
1989
1997
|
table_container.title = ''
|
1990
1998
|
table_container.instance_variable_set :@converted_title, table_dup.captioned_title
|
1991
1999
|
table_dup.title = nil
|
@@ -1997,7 +2005,6 @@ module Asciidoctor
|
|
1997
2005
|
num_rows = node.attr 'rowcount'
|
1998
2006
|
num_cols = node.columns.size
|
1999
2007
|
table_header_size = false
|
2000
|
-
theme = @theme
|
2001
2008
|
prev_font_scale, @font_scale = @font_scale, 1 if node.document.nested?
|
2002
2009
|
|
2003
2010
|
tbl_bg_color = resolve_theme_color :table_background_color
|
@@ -2023,15 +2030,15 @@ module Asciidoctor
|
|
2023
2030
|
head_rows = node.rows[:head]
|
2024
2031
|
body_rows = node.rows[:body]
|
2025
2032
|
#if (hrows = node.attr 'hrows') && (shift_rows = hrows.to_i - head_rows.size) > 0
|
2026
|
-
# head_rows = head_rows.
|
2027
|
-
# body_rows = body_rows.
|
2033
|
+
# head_rows = head_rows.drop 0
|
2034
|
+
# body_rows = body_rows.drop 0
|
2028
2035
|
# shift_rows.times { head_rows << body_rows.shift unless body_rows.empty? }
|
2029
2036
|
#end
|
2030
2037
|
theme_font :table_head do
|
2031
2038
|
table_header_size = head_rows.size
|
2032
2039
|
head_font_info = font_info
|
2033
2040
|
head_line_metrics = calc_line_metrics theme.table_head_line_height || theme.table_cell_line_height || @base_line_height
|
2034
|
-
head_cell_padding = (
|
2041
|
+
head_cell_padding = (theme.table_head_cell_padding ? (expand_padding_value theme.table_head_cell_padding) : body_cell_padding).drop 0
|
2035
2042
|
head_cell_padding[0] += head_line_metrics.padding_top
|
2036
2043
|
head_cell_padding[2] += head_line_metrics.padding_bottom
|
2037
2044
|
# QUESTION: why doesn't text transform inherit from table?
|
@@ -2142,7 +2149,7 @@ module Asciidoctor
|
|
2142
2149
|
cell_data = { content: asciidoc_cell, source_location: cell.source_location }
|
2143
2150
|
end
|
2144
2151
|
if cell_line_metrics
|
2145
|
-
cell_padding = body_cell_padding.
|
2152
|
+
cell_padding = body_cell_padding.drop 0
|
2146
2153
|
cell_padding[0] += cell_line_metrics.padding_top
|
2147
2154
|
cell_padding[2] += cell_line_metrics.padding_bottom
|
2148
2155
|
cell_data[:leading] = cell_line_metrics.leading
|
@@ -2235,7 +2242,6 @@ module Asciidoctor
|
|
2235
2242
|
alignment = theme.table_align&.to_sym || :left
|
2236
2243
|
end
|
2237
2244
|
|
2238
|
-
caption_end = theme.table_caption_end&.to_sym || :top
|
2239
2245
|
caption_max_width = theme.table_caption_max_width || 'fit-content'
|
2240
2246
|
|
2241
2247
|
table_settings = {
|
@@ -2267,7 +2273,7 @@ module Asciidoctor
|
|
2267
2273
|
@column_widths = column_widths unless column_widths.empty?
|
2268
2274
|
# NOTE: call width to capture resolved table width
|
2269
2275
|
table_width = width
|
2270
|
-
@pdf.ink_table_caption node, alignment, table_width, caption_max_width if
|
2276
|
+
@pdf.ink_table_caption node, alignment, table_width, caption_max_width if caption_end == :top && node.title?
|
2271
2277
|
# NOTE: align using padding instead of bounding_box as prawn-table does
|
2272
2278
|
# using a bounding_box across pages mangles the margin box of subsequent pages
|
2273
2279
|
if alignment != :left && table_width != (this_bounds = @pdf.bounds).width
|
@@ -2340,7 +2346,7 @@ module Asciidoctor
|
|
2340
2346
|
bounds.subtract_left_padding left_padding
|
2341
2347
|
bounds.subtract_right_padding right_padding if right_padding
|
2342
2348
|
end
|
2343
|
-
ink_table_caption node, alignment, table_width, caption_max_width, caption_end if
|
2349
|
+
ink_table_caption node, alignment, table_width, caption_max_width, caption_end if caption_end == :bottom && node.title?
|
2344
2350
|
theme_margin :block, :bottom, (next_enclosed_block node)
|
2345
2351
|
rescue ::Prawn::Errors::CannotFit
|
2346
2352
|
log :error, (message_with_context 'cannot fit contents of table cell into specified column width', source_location: node.source_location)
|
@@ -3855,7 +3861,7 @@ module Asciidoctor
|
|
3855
3861
|
font_style: dot_leader_font_style,
|
3856
3862
|
font_size: font_size,
|
3857
3863
|
levels: ((dot_leader_l = @theme.toc_dot_leader_levels) == 'none' ? ::Set.new :
|
3858
|
-
(dot_leader_l && dot_leader_l != 'all' ? dot_leader_l.to_s.split.map(&:to_i).to_set :
|
3864
|
+
(dot_leader_l && dot_leader_l != 'all' ? dot_leader_l.to_s.split.map(&:to_i).to_set : nil)),
|
3859
3865
|
text: (dot_leader_text = @theme.toc_dot_leader_content || DotLeaderTextDefault),
|
3860
3866
|
width: dot_leader_text.empty? ? 0 : (rendered_width_of_string dot_leader_text),
|
3861
3867
|
# TODO: spacer gives a little bit of room between dots and page number
|
@@ -3929,7 +3935,7 @@ module Asciidoctor
|
|
3929
3935
|
end_cursor = cursor
|
3930
3936
|
move_cursor_to start_cursor
|
3931
3937
|
# NOTE: we're guaranteed to be on the same page as the final line of the entry
|
3932
|
-
if dot_leader[:width] > 0 && (dot_leader[:levels].include? entry_level.pred)
|
3938
|
+
if dot_leader[:width] > 0 && (dot_leader[:levels] ? (dot_leader[:levels].include? entry_level.pred) : true)
|
3933
3939
|
pgnum_label_width = rendered_width_of_string pgnum_label
|
3934
3940
|
pgnum_label_font_settings = { color: @font_color, font: font_family, size: @font_size, styles: font_styles }
|
3935
3941
|
save_font do
|
@@ -4903,7 +4909,7 @@ module Asciidoctor
|
|
4903
4909
|
end
|
4904
4910
|
|
4905
4911
|
def init_float_box _node, block_width, block_height, float_to
|
4906
|
-
gap = ::Array === (gap = @theme.image_float_gap) ? gap.
|
4912
|
+
gap = ::Array === (gap = @theme.image_float_gap) ? (gap.drop 0) : [gap, gap]
|
4907
4913
|
float_w = block_width + (gap[0] ||= 12)
|
4908
4914
|
float_h = block_height + (gap[1] ||= 6)
|
4909
4915
|
box_l = bounds.left + (float_to == 'right' ? 0 : float_w)
|
@@ -9,6 +9,6 @@ File.singleton_class.prepend (Module.new do
|
|
9
9
|
|
10
10
|
# NOTE: JRuby < 9.4 doesn't implement this method; JRuby 9.4 implements it incorrectly
|
11
11
|
def absolute_path? path
|
12
|
-
(
|
12
|
+
(Pathname.new path).absolute? && !(%r/\A[[:alpha:]][[:alnum:]\-+]*:\/\/\S/.match? path)
|
13
13
|
end
|
14
14
|
end) if RUBY_ENGINE == 'jruby'
|
@@ -4,7 +4,7 @@ Prawn::Font::AFM.instance_variable_set :@hide_m17n_warning, true
|
|
4
4
|
|
5
5
|
require 'prawn/icon'
|
6
6
|
|
7
|
-
Prawn::Icon::Compatibility.prepend (
|
7
|
+
Prawn::Icon::Compatibility.prepend (Module.new { def warning *_args; end })
|
8
8
|
|
9
9
|
module Asciidoctor
|
10
10
|
module Prawn
|
@@ -1002,9 +1002,16 @@ module Asciidoctor
|
|
1002
1002
|
# start_new_page. Using start_new_page can mangle the calculation of content block's extent.
|
1003
1003
|
#
|
1004
1004
|
def arrange_block node, &block
|
1005
|
-
|
1005
|
+
if at_page_top?
|
1006
|
+
at_top = true
|
1007
|
+
else
|
1008
|
+
at_top = true if node.first_child? && (node.parent.attr? 'pdf-at-top')
|
1009
|
+
keep_together = true if node.option? 'unbreakable'
|
1010
|
+
end
|
1011
|
+
node.set_attr 'pdf-at-top', '' if at_top
|
1006
1012
|
doc = node.document
|
1007
1013
|
block_for_scratch = proc do
|
1014
|
+
at_top = node.set_attr 'pdf-at-top', '' if !at_top && at_page_top?
|
1008
1015
|
push_scratch doc
|
1009
1016
|
instance_exec(&block)
|
1010
1017
|
ensure
|
@@ -1012,6 +1019,8 @@ module Asciidoctor
|
|
1012
1019
|
end
|
1013
1020
|
extent = dry_run keep_together: keep_together, onto: [self, keep_together], &block_for_scratch
|
1014
1021
|
scratch? ? block_for_scratch.call : (yield extent)
|
1022
|
+
ensure
|
1023
|
+
node.remove_attr 'pdf-at-top' if at_top
|
1015
1024
|
end
|
1016
1025
|
|
1017
1026
|
# This method installs an on_page_create_callback that stops processing if the first page is
|
@@ -32,21 +32,26 @@ Prawn::Text::Formatted::Box.prepend (Module.new do
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
-
#
|
35
|
+
# help Prawn correctly resolve which font to analyze, including the font style
|
36
36
|
def analyze_glyphs_for_fallback_font_support fragment_hash
|
37
37
|
fragment_font = fragment_hash[:font] || (original_font = @document.font.family)
|
38
|
+
effective_font_styles = @document.font_styles
|
39
|
+
fragment_font_opts = {}
|
38
40
|
if (fragment_font_styles = fragment_hash[:styles])
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
41
|
+
effective_font_styles.merge fragment_font_styles
|
42
|
+
if effective_font_styles.include? :bold
|
43
|
+
fragment_font_opts[:style] = (effective_font_styles.include? :italic) ? :bold_italic : :bold
|
44
|
+
elsif effective_font_styles.include? :italic
|
45
|
+
fragment_font_opts[:style] = :italic
|
43
46
|
end
|
47
|
+
elsif !effective_font_styles.empty?
|
48
|
+
fragment_font_opts[:style] = @document.resolve_font_style effective_font_styles
|
44
49
|
end
|
45
|
-
fallback_fonts = @fallback_fonts.
|
50
|
+
fallback_fonts = @fallback_fonts.drop 0
|
46
51
|
font_glyph_pairs = []
|
47
52
|
@document.save_font do
|
48
53
|
fragment_hash[:text].each_char do |char|
|
49
|
-
font_glyph_pairs << [(find_font_for_this_glyph char, fragment_font, fragment_font_opts
|
54
|
+
font_glyph_pairs << [(find_font_for_this_glyph char, fragment_font, fragment_font_opts, (fallback_fonts.drop 0)), char]
|
50
55
|
end
|
51
56
|
end
|
52
57
|
# NOTE: don't add a :font to fragment if it wasn't there originally
|
@@ -61,7 +66,7 @@ Prawn::Text::Formatted::Box.prepend (Module.new do
|
|
61
66
|
current_font
|
62
67
|
elsif fallback_fonts_to_check.empty?
|
63
68
|
if logger.info? && !doc.scratch?
|
64
|
-
fonts_checked = @fallback_fonts
|
69
|
+
fonts_checked = [original_font].concat @fallback_fonts
|
65
70
|
missing_chars = (doc.instance_variable_defined? :@missing_chars) ?
|
66
71
|
(doc.instance_variable_get :@missing_chars) : (doc.instance_variable_set :@missing_chars, {})
|
67
72
|
previous_fonts_checked = (missing_chars[char] ||= [])
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Prawn::SVG::Elements::Image.prepend (Module.new do
|
4
4
|
def image_dimensions data
|
5
5
|
unless (handler = find_image_handler data)
|
6
|
-
raise
|
6
|
+
raise Prawn::SVG::Elements::Base::SkipElementError, 'Unsupported image type supplied to image tag'
|
7
7
|
end
|
8
8
|
image = handler.new data
|
9
9
|
[image.width.to_f, image.height.to_f]
|
@@ -136,7 +136,7 @@ module Rouge
|
|
136
136
|
fragment[:color] = fg
|
137
137
|
end
|
138
138
|
if style_rules[:bold]
|
139
|
-
fragment[:styles] = style_rules[:italic] ? BoldItalicStyle
|
139
|
+
fragment[:styles] = (style_rules[:italic] ? BoldItalicStyle : BoldStyle).dup
|
140
140
|
elsif style_rules[:italic]
|
141
141
|
fragment[:styles] = ItalicStyle.dup
|
142
142
|
end
|
@@ -379,7 +379,7 @@ module Asciidoctor
|
|
379
379
|
if fragment
|
380
380
|
fragment = fragment.dup
|
381
381
|
fragment[:styles] = fragment[:styles].dup if fragment.key? :styles
|
382
|
-
fragment[:callback] = fragment[:callback].
|
382
|
+
fragment[:callback] = fragment[:callback].drop 0 if fragment.key? :callback
|
383
383
|
else
|
384
384
|
fragment = {}
|
385
385
|
end
|
@@ -11,7 +11,7 @@ File.singleton_class.alias_method :exists?, :exist? unless File.respond_to? :exi
|
|
11
11
|
|
12
12
|
RGhost::GSAlone.prepend (Module.new do
|
13
13
|
def initialize params, debug
|
14
|
-
(@params = params.
|
14
|
+
(@params = params.drop 0).push(*(@params.pop.split File::PATH_SEPARATOR))
|
15
15
|
@debug = debug
|
16
16
|
end
|
17
17
|
|
@@ -22,7 +22,7 @@ module Asciidoctor
|
|
22
22
|
LoneVariableRx = /^\$([a-z0-9_-]+)$/
|
23
23
|
HexColorEntryRx = /^(?<k> *\p{Graph}+): +(?!null$)(?<q>["']?)(?<h>#)?(?<v>\h\h\h\h{0,3})\k<q> *(?:#.*)?$/
|
24
24
|
MultiplyDivideOpRx = %r((-?\d+(?:\.\d+)?) +([*/^]) +(-?\d+(?:\.\d+)?))
|
25
|
-
AddSubtractOpRx = /(-?\d+(?:\.\d+)?) +([
|
25
|
+
AddSubtractOpRx = /(-?\d+(?:\.\d+)?) +([+-]) +(-?\d+(?:\.\d+)?)/
|
26
26
|
PrecisionFuncRx = /^(round|floor|ceil)\(/
|
27
27
|
RoleAlignKeyRx = /(?:_text)?_align$/
|
28
28
|
|
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.10
|
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: 2023-
|
12
|
+
date: 2023-12-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: asciidoctor
|