asciidoctor-pdf 1.5.0.beta.8 → 1.5.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.adoc +49 -0
  3. data/LICENSE.adoc +1 -1
  4. data/NOTICE.adoc +1 -1
  5. data/README.adoc +43 -47
  6. data/asciidoctor-pdf.gemspec +5 -1
  7. data/bin/asciidoctor-pdf-optimize +1 -1
  8. data/data/themes/base-theme.yml +4 -3
  9. data/data/themes/default-theme.yml +10 -5
  10. data/docs/theming-guide.adoc +286 -22
  11. data/lib/asciidoctor-pdf.rb +1 -0
  12. data/lib/asciidoctor-pdf/converter.rb +1 -0
  13. data/lib/asciidoctor-pdf/version.rb +1 -0
  14. data/lib/asciidoctor/pdf.rb +13 -2
  15. data/lib/asciidoctor/pdf/converter.rb +3962 -3955
  16. data/lib/asciidoctor/pdf/ext.rb +9 -0
  17. data/lib/asciidoctor/pdf/ext/asciidoctor.rb +1 -0
  18. data/lib/asciidoctor/pdf/ext/asciidoctor/abstract_block.rb +1 -0
  19. data/lib/asciidoctor/pdf/ext/asciidoctor/abstract_node.rb +1 -0
  20. data/lib/asciidoctor/pdf/ext/asciidoctor/document.rb +1 -0
  21. data/lib/asciidoctor/pdf/ext/asciidoctor/image.rb +18 -16
  22. data/lib/asciidoctor/pdf/ext/asciidoctor/list.rb +3 -2
  23. data/lib/asciidoctor/pdf/ext/asciidoctor/list_item.rb +2 -1
  24. data/lib/asciidoctor/pdf/ext/asciidoctor/logging_shim.rb +3 -4
  25. data/lib/asciidoctor/pdf/ext/asciidoctor/section.rb +8 -6
  26. data/lib/asciidoctor/pdf/ext/core.rb +2 -0
  27. data/lib/asciidoctor/pdf/ext/core/array.rb +1 -0
  28. data/lib/asciidoctor/pdf/ext/core/hash.rb +1 -0
  29. data/lib/asciidoctor/pdf/ext/core/numeric.rb +4 -3
  30. data/lib/asciidoctor/pdf/ext/core/object.rb +1 -0
  31. data/lib/asciidoctor/pdf/ext/core/quantifiable_stdout.rb +8 -1
  32. data/lib/asciidoctor/pdf/ext/core/regexp.rb +1 -0
  33. data/lib/asciidoctor/pdf/ext/core/string.rb +6 -7
  34. data/lib/asciidoctor/pdf/ext/pdf-core.rb +1 -0
  35. data/lib/asciidoctor/pdf/ext/pdf-core/page.rb +3 -4
  36. data/lib/asciidoctor/pdf/ext/pdf-core/pdf_object.rb +2 -1
  37. data/lib/asciidoctor/pdf/ext/prawn-svg.rb +1 -0
  38. data/lib/asciidoctor/pdf/ext/prawn-svg/interface.rb +11 -8
  39. data/lib/asciidoctor/pdf/ext/prawn-table.rb +2 -1
  40. data/lib/asciidoctor/pdf/ext/prawn-table/cell.rb +9 -10
  41. data/lib/asciidoctor/pdf/ext/prawn-table/cell/asciidoc.rb +62 -57
  42. data/lib/asciidoctor/pdf/ext/prawn-table/cell/text.rb +5 -3
  43. data/lib/asciidoctor/pdf/ext/prawn-templates.rb +1 -0
  44. data/lib/asciidoctor/pdf/ext/prawn.rb +1 -0
  45. data/lib/asciidoctor/pdf/ext/prawn/coderay_encoder.rb +73 -72
  46. data/lib/asciidoctor/pdf/ext/prawn/extensions.rb +814 -818
  47. data/lib/asciidoctor/pdf/ext/prawn/font/afm.rb +4 -3
  48. data/lib/asciidoctor/pdf/ext/prawn/formatted_text/box.rb +2 -1
  49. data/lib/asciidoctor/pdf/ext/prawn/formatted_text/fragment.rb +7 -2
  50. data/lib/asciidoctor/pdf/ext/prawn/images.rb +45 -44
  51. data/lib/asciidoctor/pdf/ext/pygments.rb +34 -0
  52. data/lib/asciidoctor/pdf/ext/rouge.rb +1 -1
  53. data/lib/asciidoctor/pdf/ext/rouge/formatters/prawn.rb +181 -149
  54. data/lib/asciidoctor/pdf/ext/rouge/themes/asciidoctor_pdf_default.rb +1 -0
  55. data/lib/asciidoctor/pdf/formatted_text.rb +2 -0
  56. data/lib/asciidoctor/pdf/formatted_text/formatter.rb +35 -34
  57. data/lib/asciidoctor/pdf/formatted_text/fragment_position_renderer.rb +8 -7
  58. data/lib/asciidoctor/pdf/formatted_text/inline_destination_marker.rb +13 -14
  59. data/lib/asciidoctor/pdf/formatted_text/inline_image_arranger.rb +112 -133
  60. data/lib/asciidoctor/pdf/formatted_text/inline_image_renderer.rb +43 -41
  61. data/lib/asciidoctor/pdf/formatted_text/inline_text_aligner.rb +15 -14
  62. data/lib/asciidoctor/pdf/formatted_text/source_wrap.rb +43 -0
  63. data/lib/asciidoctor/pdf/formatted_text/text_background_and_border_renderer.rb +46 -37
  64. data/lib/asciidoctor/pdf/formatted_text/transform.rb +371 -352
  65. data/lib/asciidoctor/pdf/index_catalog.rb +99 -95
  66. data/lib/asciidoctor/pdf/measurements.rb +51 -48
  67. data/lib/asciidoctor/pdf/optimizer.rb +34 -31
  68. data/lib/asciidoctor/pdf/pdfmark.rb +34 -33
  69. data/lib/asciidoctor/pdf/roman_numeral.rb +80 -79
  70. data/lib/asciidoctor/pdf/sanitizer.rb +38 -37
  71. data/lib/asciidoctor/pdf/temporary_path.rb +10 -9
  72. data/lib/asciidoctor/pdf/text_transformer.rb +101 -100
  73. data/lib/asciidoctor/pdf/theme_loader.rb +258 -256
  74. data/lib/asciidoctor/pdf/version.rb +5 -4
  75. metadata +55 -6
  76. data/lib/asciidoctor/pdf/ext/rouge/themes/bw.rb +0 -39
  77. data/lib/asciidoctor/pdf/ext/ttfunk.rb +0 -9
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Asciidoctor
3
- module PDF
4
- VERSION = '1.5.0.beta.8'
5
- end
6
- Pdf = PDF unless const_defined? :Pdf, false
4
+ module PDF
5
+ VERSION = '1.5.0.rc.1'
6
+ end
7
+ Pdf = PDF unless const_defined? :Pdf, false
7
8
  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: 1.5.0.beta.8
4
+ version: 1.5.0.rc.1
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: 2019-11-23 00:00:00.000000000 Z
12
+ date: 2020-01-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: asciidoctor
@@ -45,6 +45,26 @@ dependencies:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 2.2.0
48
+ - !ruby/object:Gem::Dependency
49
+ name: ttfunk
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.5.0
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: 1.5.1
58
+ type: :runtime
59
+ prerelease: false
60
+ version_requirements: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - "~>"
63
+ - !ruby/object:Gem::Version
64
+ version: 1.5.0
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: 1.5.1
48
68
  - !ruby/object:Gem::Dependency
49
69
  name: prawn-table
50
70
  requirement: !ruby/object:Gem::Requirement
@@ -233,14 +253,42 @@ dependencies:
233
253
  requirements:
234
254
  - - "~>"
235
255
  - !ruby/object:Gem::Version
236
- version: 3.11.0
256
+ version: 3.14.0
257
+ type: :development
258
+ prerelease: false
259
+ version_requirements: !ruby/object:Gem::Requirement
260
+ requirements:
261
+ - - "~>"
262
+ - !ruby/object:Gem::Version
263
+ version: 3.14.0
264
+ - !ruby/object:Gem::Dependency
265
+ name: rubocop
266
+ requirement: !ruby/object:Gem::Requirement
267
+ requirements:
268
+ - - "~>"
269
+ - !ruby/object:Gem::Version
270
+ version: 0.78.0
271
+ type: :development
272
+ prerelease: false
273
+ version_requirements: !ruby/object:Gem::Requirement
274
+ requirements:
275
+ - - "~>"
276
+ - !ruby/object:Gem::Version
277
+ version: 0.78.0
278
+ - !ruby/object:Gem::Dependency
279
+ name: rubocop-rspec
280
+ requirement: !ruby/object:Gem::Requirement
281
+ requirements:
282
+ - - "~>"
283
+ - !ruby/object:Gem::Version
284
+ version: 1.37.0
237
285
  type: :development
238
286
  prerelease: false
239
287
  version_requirements: !ruby/object:Gem::Requirement
240
288
  requirements:
241
289
  - - "~>"
242
290
  - !ruby/object:Gem::Version
243
- version: 3.11.0
291
+ version: 1.37.0
244
292
  - !ruby/object:Gem::Dependency
245
293
  name: coderay
246
294
  requirement: !ruby/object:Gem::Requirement
@@ -313,6 +361,7 @@ files:
313
361
  - lib/asciidoctor-pdf/version.rb
314
362
  - lib/asciidoctor/pdf.rb
315
363
  - lib/asciidoctor/pdf/converter.rb
364
+ - lib/asciidoctor/pdf/ext.rb
316
365
  - lib/asciidoctor/pdf/ext/asciidoctor.rb
317
366
  - lib/asciidoctor/pdf/ext/asciidoctor/abstract_block.rb
318
367
  - lib/asciidoctor/pdf/ext/asciidoctor/abstract_node.rb
@@ -347,11 +396,10 @@ files:
347
396
  - lib/asciidoctor/pdf/ext/prawn/formatted_text/box.rb
348
397
  - lib/asciidoctor/pdf/ext/prawn/formatted_text/fragment.rb
349
398
  - lib/asciidoctor/pdf/ext/prawn/images.rb
399
+ - lib/asciidoctor/pdf/ext/pygments.rb
350
400
  - lib/asciidoctor/pdf/ext/rouge.rb
351
401
  - lib/asciidoctor/pdf/ext/rouge/formatters/prawn.rb
352
402
  - lib/asciidoctor/pdf/ext/rouge/themes/asciidoctor_pdf_default.rb
353
- - lib/asciidoctor/pdf/ext/rouge/themes/bw.rb
354
- - lib/asciidoctor/pdf/ext/ttfunk.rb
355
403
  - lib/asciidoctor/pdf/formatted_text.rb
356
404
  - lib/asciidoctor/pdf/formatted_text/formatter.rb
357
405
  - lib/asciidoctor/pdf/formatted_text/fragment_position_renderer.rb
@@ -361,6 +409,7 @@ files:
361
409
  - lib/asciidoctor/pdf/formatted_text/inline_text_aligner.rb
362
410
  - lib/asciidoctor/pdf/formatted_text/parser.rb
363
411
  - lib/asciidoctor/pdf/formatted_text/parser.treetop
412
+ - lib/asciidoctor/pdf/formatted_text/source_wrap.rb
364
413
  - lib/asciidoctor/pdf/formatted_text/text_background_and_border_renderer.rb
365
414
  - lib/asciidoctor/pdf/formatted_text/transform.rb
366
415
  - lib/asciidoctor/pdf/index_catalog.rb
@@ -1,39 +0,0 @@
1
- # frozen_string_literal: true
2
- module Rouge
3
- module Themes
4
- # A port of the bw style from Pygments.
5
- # See https://bitbucket.org/birkenfeld/pygments-main/src/default/pygments/styles/bw.py
6
- class BlackWhiteTheme < CSSTheme
7
- name 'bw'
8
-
9
- style Text, fg: '#000000', bg: '#ffffff'
10
-
11
- style Comment, italic: true
12
- style Comment::Preproc, italic: false
13
-
14
- style Keyword, bold: true
15
- style Keyword::Pseudo, bold: false
16
- style Keyword::Type, bold: false
17
-
18
- style Operator, bold: true
19
-
20
- style Name::Class, bold: true
21
- style Name::Namespace, bold: true
22
- style Name::Exception, bold: true
23
- style Name::Entity, bold: true
24
- style Name::Tag, bold: true
25
-
26
- style Literal::String, italic: true
27
- style Literal::String::Interpol, bold: true
28
- style Literal::String::Escape, bold: true
29
-
30
- style Generic::Heading, bold: true
31
- style Generic::Subheading, bold: true
32
- style Generic::Emph, italic: true
33
- style Generic::Strong, bold: true
34
- style Generic::Prompt, bold: true
35
-
36
- style Error, fg: '#FF0000'
37
- end
38
- end
39
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
- # patch ttfunk 1.5.0; see https://github.com/prawnpdf/ttfunk/issues/39
3
- class TTFunk::Subset::Base
4
- alias __checksum checksum
5
- def checksum data
6
- return 0 if data.length == 0
7
- __checksum data
8
- end
9
- end