asciidoctor-pdf 2.3.15 → 2.3.17

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: 4b65e5da741e3df4c56f2e6ee79a9500dbd28a7c3f27d1ffea9c66bbb4d7031d
4
- data.tar.gz: 41020f7cff7695528dac65d0d6368b4688f1fc00895a6ed68c9bf0d1c34ab594
3
+ metadata.gz: 493c0b612bcd07229becd5c1c53decdeaec3aeff63851556901c942257b091a9
4
+ data.tar.gz: 609bd614ebf487afc8b078b63a6b7e2e34d9f4377fecd0bffc718b673d63c6e1
5
5
  SHA512:
6
- metadata.gz: cd72a63d48e8f29937bc6613257924d169fa3e878e3b5ab23a846fdc3fcccc1ee2471f800c380deee22b14b624b9db2383b8e00de62d21408467e3a3c77047b8
7
- data.tar.gz: ada67363d0d5a5e551a4f9b499d31ce273d831e9de6c3c259130739c5b006f06937315f3130d25b89cf32a4b332deb3da23487cca9b856fd6753e24d2a4e027b
6
+ metadata.gz: 6bb6846fa124db582fe86992eace65b4d1263403971198f8d78cf8f2f33556dfdb3104ccff0f15dd27c316d94d65c3b3dd554f7b6e9527cfaf5ccffca8f642b5
7
+ data.tar.gz: 4fba487e7098185b900a2a6dbcafdf7e29ab345945562f832841ef4d06acfca76dc3d11f1c8b0fd80cc636f8102ae2239656049dee0ddd7861adff020ae1edde
data/CHANGELOG.adoc CHANGED
@@ -5,6 +5,37 @@
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.17 (2024-06-01) - @mojavelinux
9
+
10
+ Improvements::
11
+
12
+ * always use /Producer field in document info to credit Asciidoctor PDF and Prawn, even when author is set (#2510)
13
+ * map `producer` attribute to /Producer field in document info to override or default value (#2510)
14
+ * map `publisher` attribute to /Creator field instead of /Producer field in document info; use author as fallback (#2510)
15
+
16
+ === Details
17
+
18
+ {url-repo}/releases/tag/v2.3.17[git tag] | {url-repo}/compare/v2.3.16\...v2.3.17[full diff]
19
+
20
+ == 2.3.16 (2024-05-31) - @mojavelinux
21
+
22
+ Improvements::
23
+
24
+ * don't hyphenate autolink when hyphenation is enabled (#2521) (*@meonkeys*)
25
+ * add support for base64-encoded SVG image reference in SVG (#2512)
26
+
27
+ Bug Fixes::
28
+
29
+ * duplicate attributes on table when wrapping table in breakable or unbreakable container (#2520)
30
+
31
+ Compliance::
32
+
33
+ * lock version of rexml (pulled in by asciidoctor-diagram and prawn-svg) to fix incompatibility
34
+
35
+ === Details
36
+
37
+ {url-repo}/releases/tag/v2.3.16[git tag] | {url-repo}/compare/v2.3.15\...v2.3.16[full diff]
38
+
8
39
  == 2.3.15 (2024-03-12) - @mojavelinux
9
40
 
10
41
  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.3.15, 2024-03-12
3
+ v2.3.17, 2024-06-01
4
4
  // Settings:
5
5
  :experimental:
6
6
  :idprefix:
@@ -42,6 +42,7 @@ Gem::Specification.new do |s|
42
42
  s.add_runtime_dependency 'prawn-svg', '~> 0.34.0'
43
43
  s.add_runtime_dependency 'prawn-icon', '~> 3.0.0'
44
44
  s.add_runtime_dependency 'concurrent-ruby', '~> 1.1'
45
+ s.add_runtime_dependency 'rexml', '3.2.6' # lock rexml to 3.2.6 since 3.2.7 and up breaks Ruby
45
46
  s.add_runtime_dependency 'treetop', '~> 1.6.0'
46
47
 
47
48
  s.add_development_dependency 'rake', '~> 13.0.0'
@@ -525,13 +525,12 @@ module Asciidoctor
525
525
  end
526
526
  info[:Subject] = (sanitize doc.attr 'subject').as_pdf if doc.attr? 'subject'
527
527
  info[:Keywords] = (sanitize doc.attr 'keywords').as_pdf if doc.attr? 'keywords'
528
- info[:Producer] = (sanitize doc.attr 'publisher').as_pdf if doc.attr? 'publisher'
528
+ info[:Creator] = (doc.attr? 'publisher') ? (sanitize doc.attr 'publisher').as_pdf : (info[:Author] || '')
529
+ info[:Producer] = (sanitize doc.attr 'producer').as_pdf if doc.attr? 'producer'
529
530
  if doc.attr? 'reproducible'
530
- info[:Creator] = 'Asciidoctor PDF, based on Prawn'.as_pdf
531
- info[:Producer] ||= (info[:Author] || info[:Creator])
531
+ info[:Producer] ||= 'Asciidoctor PDF, based on Prawn'.as_pdf
532
532
  else
533
- info[:Creator] = %(Asciidoctor PDF #{::Asciidoctor::PDF::VERSION}, based on Prawn #{::Prawn::VERSION}).as_pdf
534
- info[:Producer] ||= (info[:Author] || info[:Creator])
533
+ info[:Producer] ||= %(Asciidoctor PDF #{::Asciidoctor::PDF::VERSION}, based on Prawn #{::Prawn::VERSION}).as_pdf
535
534
  # NOTE: since we don't track the creation date of the input file, we map the ModDate header to the last modified
536
535
  # date of the input document and the CreationDate header to the date the PDF was produced by the converter.
537
536
  info[:ModDate] = (::Time.parse doc.attr 'docdatetime') rescue (now ||= ::Time.now)
@@ -1989,6 +1988,8 @@ module Asciidoctor
1989
1988
  if !at_page_top? && ((unbreakable = node.option? 'unbreakable') || ((node.option? 'breakable') && (node.id || node.title?)))
1990
1989
  # NOTE: we use the current node as the parent so we can navigate back into the document model
1991
1990
  (table_container = Block.new node, :open) << (table_dup = node.dup)
1991
+ # NOTE: we need to duplicate the attributes so that the unbreakable/breakable option is preserved on subsequent conversions
1992
+ table_dup.instance_variable_set :@attributes, node.attributes.dup
1992
1993
  if unbreakable
1993
1994
  table_dup.remove_attr 'unbreakable-option'
1994
1995
  table_container.set_attr 'unbreakable-option'
@@ -2,5 +2,5 @@
2
2
 
3
3
  class Prawn::SVG::Loaders::Data
4
4
  remove_const :REGEXP
5
- REGEXP = %r(\Adata:image/(?:png|jpe?g);base64(?:;[a-z0-9]+)*,)i
5
+ REGEXP = %r(\Adata:image/(?:png|jpe?g|svg\+xml);base64(?:;[a-z0-9]+)*,)i
6
6
  end
@@ -8,6 +8,7 @@ module Asciidoctor
8
8
  TagFilterRx = /(<[^>]+>)|([^<]+)/
9
9
  ContiguousCharsRx = /\p{Graph}+/
10
10
  WordRx = /\p{Word}+/
11
+ BareClassRx = / class="bare[" ]/
11
12
  Hyphen = '-'
12
13
  SoftHyphen = ?\u00ad
13
14
  LowerAlphaChars = 'a-z'
@@ -31,7 +32,15 @@ module Asciidoctor
31
32
 
32
33
  def hyphenate_words_pcdata string, hyphenator
33
34
  if XMLMarkupRx.match? string
34
- string.gsub(PCDATAFilterRx) { $2 ? (hyphenate_words $2, hyphenator) : $1 }
35
+ skipping = false
36
+ string.gsub PCDATAFilterRx do
37
+ if $2
38
+ skipping ? $2 : (hyphenate_words $2, hyphenator)
39
+ else
40
+ skipping = skipping ? $1 != '</a>' : ($1.start_with? '<a ') && (BareClassRx.match? $1)
41
+ $1
42
+ end
43
+ end
35
44
  else
36
45
  hyphenate_words string, hyphenator
37
46
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Asciidoctor
4
4
  module PDF
5
- VERSION = '2.3.15'
5
+ VERSION = '2.3.17'
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.3.15
4
+ version: 2.3.17
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: 2024-03-12 00:00:00.000000000 Z
12
+ date: 2024-06-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: asciidoctor
@@ -137,6 +137,20 @@ dependencies:
137
137
  - - "~>"
138
138
  - !ruby/object:Gem::Version
139
139
  version: '1.1'
140
+ - !ruby/object:Gem::Dependency
141
+ name: rexml
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - '='
145
+ - !ruby/object:Gem::Version
146
+ version: 3.2.6
147
+ type: :runtime
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - '='
152
+ - !ruby/object:Gem::Version
153
+ version: 3.2.6
140
154
  - !ruby/object:Gem::Dependency
141
155
  name: treetop
142
156
  requirement: !ruby/object:Gem::Requirement
@@ -350,7 +364,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
350
364
  - !ruby/object:Gem::Version
351
365
  version: '0'
352
366
  requirements: []
353
- rubygems_version: 3.5.3
367
+ rubygems_version: 3.5.9
354
368
  signing_key:
355
369
  specification_version: 4
356
370
  summary: Converts AsciiDoc documents to PDF using Asciidoctor and Prawn