asciidoctor-pdf 2.3.9 → 2.3.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +33 -0
- data/README.adoc +1 -1
- data/asciidoctor-pdf.gemspec +1 -1
- data/lib/asciidoctor/pdf/converter.rb +37 -24
- data/lib/asciidoctor/pdf/ext/asciidoctor/abstract_block.rb +4 -0
- data/lib/asciidoctor/pdf/ext/prawn/extensions.rb +10 -1
- 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/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/text_transformer.rb +6 -2
- data/lib/asciidoctor/pdf/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f69f8ddf5bab91f37bd488a5d630c068f028d8d9f80e47ccbd601efeb23cfd4a
|
4
|
+
data.tar.gz: 2a66022080892dade89fdfab63e60d08e619ec0cf184a793267871464668cb53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81129fe018764cbf1a2caa7d34a4a9affaf1e69288252535f9082730a785a8e2daa93eb3aa640d3368c6780c094a275dca5269a11b487764909f3a503bf5dd30
|
7
|
+
data.tar.gz: c68746b1ebbb456fd4e501a5815c2e338ffc5f09ec896757efe83a261f54533c7d7f913b251208f7122e6decae21bd51ffcfcee01ddf67682756878c44781ea6
|
data/CHANGELOG.adoc
CHANGED
@@ -5,6 +5,39 @@
|
|
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.11 (2024-01-23) - @mojavelinux
|
9
|
+
|
10
|
+
Enhancements::
|
11
|
+
|
12
|
+
* upgrade prawn-svg dependency to 0.33.x (PR #2469)
|
13
|
+
|
14
|
+
Improvements::
|
15
|
+
|
16
|
+
* extract shared `smallcaps` method from `TextTransform#smallcaps_pcdata` to make it easier to override
|
17
|
+
* assign node to `@node` instance variable on table instance to make it easer to access from Prawn::Table extension (#2471)
|
18
|
+
|
19
|
+
Bug Fixes::
|
20
|
+
|
21
|
+
* ensure color spaces are set on page before adding running content (#2477)
|
22
|
+
|
23
|
+
=== Details
|
24
|
+
|
25
|
+
{url-repo}/releases/tag/v2.3.11[git tag] | {url-repo}/compare/v2.3.10\...v2.3.11[full diff]
|
26
|
+
|
27
|
+
== 2.3.10 (2023-12-04) - @mojavelinux
|
28
|
+
|
29
|
+
Bug Fixes::
|
30
|
+
|
31
|
+
* show dot leaders in TOC entry if toclevels is increased for a given section (#2441)
|
32
|
+
* decouple tests from path of PWD (#2444)
|
33
|
+
* consider inherited styles when analyzing glyphs for fallback font support (#2463)
|
34
|
+
* add fallback character for placeholder character when using AFM font (#2453)
|
35
|
+
* don't advance image that's first child of block at top of page if image is taller than page (#2012)
|
36
|
+
|
37
|
+
=== Details
|
38
|
+
|
39
|
+
{url-repo}/releases/tag/v2.3.10[git tag] | {url-repo}/compare/v2.3.9\...v2.3.10[full diff]
|
40
|
+
|
8
41
|
== 2.3.9 (2023-06-28) - @mojavelinux
|
9
42
|
|
10
43
|
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.11, 2024-01-23
|
4
4
|
// Settings:
|
5
5
|
:experimental:
|
6
6
|
:idprefix:
|
data/asciidoctor-pdf.gemspec
CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
|
|
38
38
|
s.add_runtime_dependency 'matrix', '~> 0.4' # required until prawn >= 2.5.0 is released
|
39
39
|
s.add_runtime_dependency 'prawn-table', '~> 0.2.0'
|
40
40
|
s.add_runtime_dependency 'prawn-templates', '~> 0.1.0'
|
41
|
-
s.add_runtime_dependency 'prawn-svg', '~> 0.
|
41
|
+
s.add_runtime_dependency 'prawn-svg', '~> 0.33.0'
|
42
42
|
s.add_runtime_dependency 'prawn-icon', '~> 3.0.0'
|
43
43
|
s.add_runtime_dependency 'concurrent-ruby', '~> 1.1'
|
44
44
|
s.add_runtime_dependency 'treetop', '~> 1.6.0'
|
@@ -166,6 +166,7 @@ module Asciidoctor
|
|
166
166
|
doc.attributes['outline-title'] = '' if doc.attr_unspecified? 'outline-title'
|
167
167
|
doc.attributes['pagenums'] = '' if doc.attr_unspecified? 'pagenums'
|
168
168
|
|
169
|
+
# NOTE: & prefix required here to pass resolved method as block of on_page_create method
|
169
170
|
on_page_create(&(method :init_page).curry[doc])
|
170
171
|
|
171
172
|
marked_page_number = page_number
|
@@ -377,7 +378,7 @@ module Asciidoctor
|
|
377
378
|
if (rotated_page_margin = resolve_page_margin (doc.attr 'pdf-page-margin-rotated') || theme.page_margin_rotated)
|
378
379
|
rotated_page_margin = expand_margin_value rotated_page_margin
|
379
380
|
@edge_shorthand_cache = nil
|
380
|
-
@page_margin[PageLayouts[(PageLayouts.index page.layout) - 1]] = { recto: rotated_page_margin, verso: rotated_page_margin.
|
381
|
+
@page_margin[PageLayouts[(PageLayouts.index page.layout) - 1]] = { recto: rotated_page_margin, verso: (rotated_page_margin.drop 0) }
|
381
382
|
end
|
382
383
|
if @media == 'prepress'
|
383
384
|
@ppbook = doc.doctype == 'book'
|
@@ -632,7 +633,7 @@ module Asciidoctor
|
|
632
633
|
return convert_abstract sect
|
633
634
|
elsif (index_section = sectname == 'index') && @index.empty?
|
634
635
|
# override numbered_title to hide entry from TOC
|
635
|
-
sect.define_singleton_method :numbered_title,
|
636
|
+
sect.define_singleton_method :numbered_title, ->(*) { '' }
|
636
637
|
return
|
637
638
|
end
|
638
639
|
title = sect.numbered_title formal: true
|
@@ -1048,7 +1049,7 @@ module Asciidoctor
|
|
1048
1049
|
else
|
1049
1050
|
highlighter = nil
|
1050
1051
|
end
|
1051
|
-
saved_subs = (subs = node.subs).
|
1052
|
+
saved_subs = (subs = node.subs).drop 0
|
1052
1053
|
callouts_enabled = subs.include? :callouts
|
1053
1054
|
highlight_idx = subs.index :highlight
|
1054
1055
|
# NOTE: scratch? here only applies if listing block is nested inside another block
|
@@ -1069,9 +1070,9 @@ module Asciidoctor
|
|
1069
1070
|
source_string = expand_tabs node.content
|
1070
1071
|
else
|
1071
1072
|
if callouts_enabled
|
1072
|
-
saved_lines = node.lines.
|
1073
|
+
saved_lines = node.lines.drop 0
|
1073
1074
|
subs.delete :callouts
|
1074
|
-
prev_subs = subs.
|
1075
|
+
prev_subs = subs.drop 0
|
1075
1076
|
subs.clear
|
1076
1077
|
source_string, conum_mapping = extract_conums node.content
|
1077
1078
|
node.lines.replace (source_string.split LF)
|
@@ -1421,7 +1422,7 @@ module Asciidoctor
|
|
1421
1422
|
term_inline_format = (term_font_styles = font_styles).empty? ? true : [inherited: { styles: term_font_styles }]
|
1422
1423
|
term_line_metrics = calc_line_metrics @base_line_height
|
1423
1424
|
term_padding_no_blocks = [term_line_metrics.padding_top, 10, term_line_metrics.padding_bottom, 10]
|
1424
|
-
(term_padding = term_padding_no_blocks.
|
1425
|
+
(term_padding = (term_padding_no_blocks.drop 0))[2] += @theme.prose_margin_bottom * 0.5
|
1425
1426
|
desc_padding = [0, 10, 0, 10]
|
1426
1427
|
term_kerning = default_kerning?
|
1427
1428
|
end
|
@@ -1802,16 +1803,13 @@ module Asciidoctor
|
|
1802
1803
|
end
|
1803
1804
|
# NOTE: shrink image so it fits within available space; group image & caption
|
1804
1805
|
if (rendered_h = svg_size.output_height) > (available_h = cursor - caption_h)
|
1805
|
-
unless pinned || at_page_top?
|
1806
|
+
unless pinned || at_page_top? || (node.first_child? && (node.parent.attr? 'pdf-at-top'))
|
1806
1807
|
advance_page
|
1807
1808
|
available_h = cursor - caption_h
|
1808
1809
|
end
|
1809
1810
|
rendered_w = (svg_obj.resize height: (rendered_h = available_h)).output_width if rendered_h > available_h
|
1810
1811
|
end
|
1811
1812
|
add_dest_for_block node if node.id
|
1812
|
-
# NOTE: workaround to fix Prawn not adding fill and stroke commands on page that only has an image;
|
1813
|
-
# breakage occurs when running content (stamps) are added to page
|
1814
|
-
update_colors if graphic_state.color_space.empty?
|
1815
1813
|
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?
|
1816
1814
|
image_y = y
|
1817
1815
|
# NOTE: prawn-svg does not compute :at for alignment correctly in column box, so resort to our own logic
|
@@ -1844,16 +1842,13 @@ module Asciidoctor
|
|
1844
1842
|
rendered_w, rendered_h = image_info.calc_image_dimensions width: (width || [available_w, actual_w].min)
|
1845
1843
|
# NOTE: shrink image so it fits within available space; group image & caption
|
1846
1844
|
if rendered_h > (available_h = cursor - caption_h)
|
1847
|
-
unless pinned || at_page_top?
|
1845
|
+
unless pinned || at_page_top? || (node.first_child? && (node.parent.attr? 'pdf-at-top'))
|
1848
1846
|
advance_page
|
1849
1847
|
available_h = cursor - caption_h
|
1850
1848
|
end
|
1851
1849
|
rendered_w = (image_info.calc_image_dimensions height: (rendered_h = available_h))[0] if rendered_h > available_h
|
1852
1850
|
end
|
1853
1851
|
add_dest_for_block node if node.id
|
1854
|
-
# NOTE: workaround to fix Prawn not adding fill and stroke commands on page that only has an image;
|
1855
|
-
# breakage occurs when running content (stamps) are added to page
|
1856
|
-
update_colors if graphic_state.color_space.empty?
|
1857
1852
|
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
1853
|
image_y = y
|
1859
1854
|
left = bounds.left
|
@@ -2030,15 +2025,15 @@ module Asciidoctor
|
|
2030
2025
|
head_rows = node.rows[:head]
|
2031
2026
|
body_rows = node.rows[:body]
|
2032
2027
|
#if (hrows = node.attr 'hrows') && (shift_rows = hrows.to_i - head_rows.size) > 0
|
2033
|
-
# head_rows = head_rows.
|
2034
|
-
# body_rows = body_rows.
|
2028
|
+
# head_rows = head_rows.drop 0
|
2029
|
+
# body_rows = body_rows.drop 0
|
2035
2030
|
# shift_rows.times { head_rows << body_rows.shift unless body_rows.empty? }
|
2036
2031
|
#end
|
2037
2032
|
theme_font :table_head do
|
2038
2033
|
table_header_size = head_rows.size
|
2039
2034
|
head_font_info = font_info
|
2040
2035
|
head_line_metrics = calc_line_metrics theme.table_head_line_height || theme.table_cell_line_height || @base_line_height
|
2041
|
-
head_cell_padding = (
|
2036
|
+
head_cell_padding = (theme.table_head_cell_padding ? (expand_padding_value theme.table_head_cell_padding) : body_cell_padding).drop 0
|
2042
2037
|
head_cell_padding[0] += head_line_metrics.padding_top
|
2043
2038
|
head_cell_padding[2] += head_line_metrics.padding_bottom
|
2044
2039
|
# QUESTION: why doesn't text transform inherit from table?
|
@@ -2149,7 +2144,7 @@ module Asciidoctor
|
|
2149
2144
|
cell_data = { content: asciidoc_cell, source_location: cell.source_location }
|
2150
2145
|
end
|
2151
2146
|
if cell_line_metrics
|
2152
|
-
cell_padding = body_cell_padding.
|
2147
|
+
cell_padding = body_cell_padding.drop 0
|
2153
2148
|
cell_padding[0] += cell_line_metrics.padding_top
|
2154
2149
|
cell_padding[2] += cell_line_metrics.padding_bottom
|
2155
2150
|
cell_data[:leading] = cell_line_metrics.leading
|
@@ -2268,6 +2263,7 @@ module Asciidoctor
|
|
2268
2263
|
|
2269
2264
|
left_padding = right_padding = nil
|
2270
2265
|
table table_data, table_settings do
|
2266
|
+
instance_variable_set :@node, node
|
2271
2267
|
# NOTE: cell_style must be applied manually to be compatible with both prawn-table 0.2.2 and prawn-table 0.2.3
|
2272
2268
|
cells.style cell_style
|
2273
2269
|
@column_widths = column_widths unless column_widths.empty?
|
@@ -3590,7 +3586,16 @@ module Asciidoctor
|
|
3590
3586
|
|
3591
3587
|
pagenums_enabled = doc.attr? 'pagenums'
|
3592
3588
|
periphery_layout_cache = {}
|
3593
|
-
# NOTE:
|
3589
|
+
# NOTE: Prawn fails to properly set color spaces on empty pages, but repeater relies on them
|
3590
|
+
# prefer simpler fix below call to repeat; keep this workaround in case that workaround stops working
|
3591
|
+
#(content_start_page_number..num_pages).each do |pgnum|
|
3592
|
+
# next if (disable_on_pages.include? pgnum) || (pg = state.pages[pgnum - 1]).imported_page? || !pg.graphic_state.color_space.empty?
|
3593
|
+
# go_to_page pgnum
|
3594
|
+
# set_color_space :fill, (color_space graphic_state.fill_color)
|
3595
|
+
# set_color_space :stroke, (color_space graphic_state.stroke_color)
|
3596
|
+
#end
|
3597
|
+
#go_to_page content_start_page_number if page_number != content_start_page_number
|
3598
|
+
# NOTE: this block is invoked during PDF generation, during call to #write -> #render_file and thus after #convert_document
|
3594
3599
|
repeat (content_start_page_number..num_pages), dynamic: true do
|
3595
3600
|
pgnum = page_number
|
3596
3601
|
# NOTE: don't write on pages which are imported / inserts (otherwise we can get a corrupt PDF)
|
@@ -3701,7 +3706,12 @@ module Asciidoctor
|
|
3701
3706
|
end
|
3702
3707
|
end
|
3703
3708
|
end
|
3704
|
-
|
3709
|
+
# NOTE: force repeater to consult color spaces on current page instead of the page on which repeater was created
|
3710
|
+
# if this stops working, use the commented code above repeat call instead
|
3711
|
+
unless (repeater_graphic_state = repeaters[-1].instance_variable_get :@graphic_state).singleton_methods.include? :color_space
|
3712
|
+
# NOTE: must convert override method to proc since we're are changing bind argument
|
3713
|
+
repeater_graphic_state.define_singleton_method :color_space, (method :page_color_space).to_proc
|
3714
|
+
end
|
3705
3715
|
go_to_page prev_page_number
|
3706
3716
|
nil
|
3707
3717
|
end
|
@@ -3861,7 +3871,7 @@ module Asciidoctor
|
|
3861
3871
|
font_style: dot_leader_font_style,
|
3862
3872
|
font_size: font_size,
|
3863
3873
|
levels: ((dot_leader_l = @theme.toc_dot_leader_levels) == 'none' ? ::Set.new :
|
3864
|
-
(dot_leader_l && dot_leader_l != 'all' ? dot_leader_l.to_s.split.map(&:to_i).to_set :
|
3874
|
+
(dot_leader_l && dot_leader_l != 'all' ? dot_leader_l.to_s.split.map(&:to_i).to_set : nil)),
|
3865
3875
|
text: (dot_leader_text = @theme.toc_dot_leader_content || DotLeaderTextDefault),
|
3866
3876
|
width: dot_leader_text.empty? ? 0 : (rendered_width_of_string dot_leader_text),
|
3867
3877
|
# TODO: spacer gives a little bit of room between dots and page number
|
@@ -3935,7 +3945,7 @@ module Asciidoctor
|
|
3935
3945
|
end_cursor = cursor
|
3936
3946
|
move_cursor_to start_cursor
|
3937
3947
|
# NOTE: we're guaranteed to be on the same page as the final line of the entry
|
3938
|
-
if dot_leader[:width] > 0 && (dot_leader[:levels].include? entry_level.pred)
|
3948
|
+
if dot_leader[:width] > 0 && (dot_leader[:levels] ? (dot_leader[:levels].include? entry_level.pred) : true)
|
3939
3949
|
pgnum_label_width = rendered_width_of_string pgnum_label
|
3940
3950
|
pgnum_label_font_settings = { color: @font_color, font: font_family, size: @font_size, styles: font_styles }
|
3941
3951
|
save_font do
|
@@ -4382,7 +4392,6 @@ module Asciidoctor
|
|
4382
4392
|
|
4383
4393
|
def start_new_chapter chapter
|
4384
4394
|
start_new_page unless at_page_top?
|
4385
|
-
# TODO: must call update_colors before advancing to next page if start_new_page is called in ink_chapter_title
|
4386
4395
|
start_new_page if @ppbook && verso_page? && !(chapter.option? 'nonfacing')
|
4387
4396
|
end
|
4388
4397
|
|
@@ -4909,7 +4918,7 @@ module Asciidoctor
|
|
4909
4918
|
end
|
4910
4919
|
|
4911
4920
|
def init_float_box _node, block_width, block_height, float_to
|
4912
|
-
gap = ::Array === (gap = @theme.image_float_gap) ? gap.
|
4921
|
+
gap = ::Array === (gap = @theme.image_float_gap) ? (gap.drop 0) : [gap, gap]
|
4913
4922
|
float_w = block_width + (gap[0] ||= 12)
|
4914
4923
|
float_h = block_height + (gap[1] ||= 6)
|
4915
4924
|
box_l = bounds.left + (float_to == 'right' ? 0 : float_w)
|
@@ -5062,6 +5071,10 @@ module Asciidoctor
|
|
5062
5071
|
nil
|
5063
5072
|
end
|
5064
5073
|
|
5074
|
+
def page_color_space
|
5075
|
+
page.graphic_state.color_space
|
5076
|
+
end
|
5077
|
+
|
5065
5078
|
def remove_tmp_files
|
5066
5079
|
@tmp_files.reject! {|_, path| path ? (unlink_tmp_file path) : true }
|
5067
5080
|
end
|
@@ -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] ||= [])
|
@@ -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
|
|
@@ -59,12 +59,16 @@ module Asciidoctor
|
|
59
59
|
|
60
60
|
def smallcaps_pcdata string
|
61
61
|
if XMLMarkupRx.match? string
|
62
|
-
string.gsub(PCDATAFilterRx) { $2 ? ($2
|
62
|
+
string.gsub(PCDATAFilterRx) { $2 ? (smallcaps $2) : $1 }
|
63
63
|
else
|
64
|
-
string
|
64
|
+
smallcaps string
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
+
def smallcaps string
|
69
|
+
string.tr LowerAlphaChars, SmallCapsChars
|
70
|
+
end
|
71
|
+
|
68
72
|
# Apply the text transform to the specified text.
|
69
73
|
#
|
70
74
|
# Supported transform values are "uppercase", "lowercase", or "none" (passed
|
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.11
|
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:
|
12
|
+
date: 2024-01-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: asciidoctor
|
@@ -87,14 +87,14 @@ dependencies:
|
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: 0.
|
90
|
+
version: 0.33.0
|
91
91
|
type: :runtime
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: 0.
|
97
|
+
version: 0.33.0
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: prawn-icon
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|