asciidoctor-pdf 2.0.4 → 2.0.5

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: ff0a79d0d99869a25e820f003920cb1cbb8485f103c73c6f51e6cb74b97ddcb5
4
- data.tar.gz: 318f9318f55317e4483f8e566a58db5aa4407642e75a2ece66dfa1f2f150c8bf
3
+ metadata.gz: 3c80f2acfd251ff6721a173c153551989ca3372a3a51ddbf628176f24dd84f5f
4
+ data.tar.gz: 19c675f8b088711366559a831dcea41e2008a242dc4e19a321f7e40df50e1acf
5
5
  SHA512:
6
- metadata.gz: d1ea1f2ad102f118e1de4d90ce4cf763db78f691ac6ddf5c93d9f2183b3fc0736a6767d20272d8b86815f0902088b2c42ed3dc72e59d587934d6738428271712
7
- data.tar.gz: e686737ae4e56e8bd1f82bb916fb49bf77d937d226fec53f24753144d43304efe99e55c42dcaca27372e08ab1695dd3c711e727687ebbf17bc38a99a99b9ef5d
6
+ metadata.gz: 994846a17ff30b567e29a7a14f63c8d74348ac1644a4bd9ce1d85e687736c8f0a241a5f1fa91a84c52b3ecb9c66ef68701162bdf53fd7e5733c4e6df7b19f81b
7
+ data.tar.gz: 3889ba7c0cee283800c613a6d8d5e2c34b29d1cccb3d68a5d83c09c9ff300e1550c6cf28ffdc5b3b3873a35f14b6ad2b90a75f6e97431d0667c6c4b62a1e5a79
data/CHANGELOG.adoc CHANGED
@@ -5,6 +5,17 @@
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.0.5 (2022-05-26) - @mojavelinux
9
+
10
+ Bug Fixes::
11
+
12
+ * do not filter TOC entries without an ID when computing the TOC extent (#2210)
13
+ * fix width of multi-word phrase with background and border offset (#2059)
14
+
15
+ === Details
16
+
17
+ {url-repo}/releases/tag/v2.0.5[git tag] | {url-repo}/compare/v2.0.4\...v2.0.5[full diff]
18
+
8
19
  == 2.0.4 (2022-05-25) - @mojavelinux
9
20
 
10
21
  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.0.4, 2022-05-25
3
+ v2.0.5, 2022-05-26
4
4
  // Settings:
5
5
  :experimental:
6
6
  :idprefix:
@@ -24,7 +24,7 @@ endif::[]
24
24
  :project-handle: asciidoctor-pdf
25
25
  // Variables:
26
26
  :release-line: 2.0.x
27
- :release-version: 2.0.4
27
+ :release-version: 2.0.5
28
28
  // URLs:
29
29
  :url-gem: https://rubygems.org/gems/asciidoctor-pdf
30
30
  :url-project: https://github.com/asciidoctor/asciidoctor-pdf
@@ -3758,7 +3758,6 @@ module Asciidoctor
3758
3758
  next if (num_levels_for_entry = (entry.attr 'toclevels', num_levels).to_i) < (entry_level = entry.level + 1).pred ||
3759
3759
  ((entry.option? 'notitle') && entry == entry.document.last_child && entry.empty?)
3760
3760
  theme_font :toc, level: entry_level do
3761
- next unless (entry_anchor = (entry.attr 'pdf-anchor') || entry.id)
3762
3761
  entry_title = entry.context == :section ? entry.numbered_title : (entry.title? ? entry.title : (entry.xreftext 'basic'))
3763
3762
  next if entry_title.empty?
3764
3763
  entry_title = transform_text entry_title, @text_transform if @text_transform
@@ -3770,6 +3769,7 @@ module Asciidoctor
3770
3769
  ink_prose entry_title, anchor: true, normalize: false, hanging_indent: hanging_indent, normalize_line_height: true, margin: 0
3771
3770
  end
3772
3771
  else
3772
+ entry_anchor = (entry.attr 'pdf-anchor') || entry.id
3773
3773
  if !(physical_pgnum = entry.attr 'pdf-page-start') &&
3774
3774
  (target_page_ref = (get_dest entry_anchor)&.first) &&
3775
3775
  (target_page_idx = state.pages.index {|candidate| candidate.dictionary == target_page_ref })
@@ -5,8 +5,12 @@ Prawn::Text::Formatted::Fragment.prepend (Module.new do
5
5
 
6
6
  # Prevent fragment from being written by discarding the text, optionally forcing the width to 0
7
7
  def conceal force_width_to_zero = false
8
- @text = ''
9
- @width = 0 if force_width_to_zero
8
+ if force_width_to_zero
9
+ @width = 0
10
+ @text = ''
11
+ else
12
+ @text = ' ' * space_count # preserve space_count so width is still computed correctly
13
+ end
10
14
  end
11
15
 
12
16
  # Don't strip soft hyphens when repacking unretrieved fragments
@@ -9,11 +9,16 @@ module Asciidoctor::PDF::FormattedText
9
9
  text = fragment.text
10
10
  x = fragment.left
11
11
  y = fragment.baseline
12
- align = fragment.format_state[:align]
13
- if (align == :center || align == :right) && (gap_width = fragment.width - (document.width_of text)) != 0
14
- x += gap_width * (align == :center ? 0.5 : 1)
12
+ align = (format_state = fragment.format_state)[:align]
13
+ if align == :center || align == :right
14
+ gap_width = (format_state.key? :width) ?
15
+ fragment.width - (document.width_of text) :
16
+ (format_state[:border_offset] || 0) * 2
17
+ x += gap_width * (align == :center ? 0.5 : 1) if gap_width > 0
18
+ end
19
+ document.word_spacing fragment.word_spacing do
20
+ document.draw_text! text, at: [x, y], kerning: document.default_kerning?
15
21
  end
16
- document.draw_text! text, at: [x, y]
17
22
  fragment.conceal
18
23
  end
19
24
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Asciidoctor
4
4
  module PDF
5
- VERSION = '2.0.4'
5
+ VERSION = '2.0.5'
6
6
  end
7
7
  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.0.4
4
+ version: 2.0.5
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-05-25 00:00:00.000000000 Z
12
+ date: 2022-05-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: asciidoctor