asciidoctor 2.0.3 → 2.0.4

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: b387fa0771edae16b11f32ee1bf6024ecf631fb59fb3dc4835e96cd7a73627d4
4
- data.tar.gz: 9d5d7513e9a45f12e642ed2d909f996c6105186b81d8f5ac9f074ec5e2adafd9
3
+ metadata.gz: 24d8917dc8dad4c33e7cf89ec9956e44970aa150f1ab706cbd53e7df36f1097c
4
+ data.tar.gz: 00d23a0e1534f5c51314ab890be5e4f4cacd07613220cdcc3f6c7f797cd40a67
5
5
  SHA512:
6
- metadata.gz: b8a178dbd99edc2076c7daa473096719b65076c50d9741b0f298b95b643a4c0f80a1b587f1f74afffb14af4698007231e4eda02a269dfe581e9c22095136c647
7
- data.tar.gz: d7a65f4d9e6190ab23e7dc6b8fd09adedf4bc2eb8f45922930450b0fc05277b31eb9ee854bbbce92746d5f568b84cd3973381765ffba2016467d9738bf8305ff
6
+ metadata.gz: b60f7bb9ce11278b39b6a7c6839c0a350220946a458eb10b7563b61270413ec84ae5480c71e008d39e746c1a5703e6e9a4a3c02592a71c12883c765c20d5c0fd
7
+ data.tar.gz: 2510ab8398502b191c8f5be983350b517d35e3ec9245cb2e407d3ef4c95d5b1965c91073264fc316db59b6b874a7c4f4a8402ee4cd0c7ac1591afd54f6de68e1
@@ -13,6 +13,16 @@ endif::[]
13
13
  This document provides a high-level view of the changes introduced in Asciidoctor by release.
14
14
  For a detailed view of what has changed, refer to the {uri-repo}/commits/master[commit history] on GitHub.
15
15
 
16
+ == 2.0.4 (2019-03-31) - @mojavelinux
17
+
18
+ Bug Fixes::
19
+
20
+ * allow Asciidoctor to load cleanly on Ruby 2.0 - 2.2 for distributions that provide support for these older Ruby versions
21
+ * make Asciidoctor::Converter::Config.register_for method public as documented
22
+ * remove unused Asciidoctor::Converter::BackendTraits#derive_backend_traits private method
23
+ * move Asciidoctor::Converter::BackendTraits.derive_backend_traits method to Asciidoctor::Converter
24
+ * mark render and render_file methods as deprecated in API docs
25
+
16
26
  == 2.0.3 (2019-03-28) - @mojavelinux
17
27
 
18
28
  Bug Fixes::
@@ -1,6 +1,6 @@
1
1
  = Asciidoctor
2
2
  Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>; Ryan Waldron <https://github.com/erebor[@erebor]>
3
- v2.0.3, 2019-03-28
3
+ v2.0.4, 2019-03-31
4
4
  // settings:
5
5
  :idprefix:
6
6
  :idseparator: -
@@ -17,7 +17,7 @@ ifdef::env-github[]
17
17
  :warning-caption: :warning:
18
18
  endif::[]
19
19
  // Variables:
20
- :release-version: 2.0.3
20
+ :release-version: 2.0.4
21
21
  // URIs:
22
22
  :uri-org: https://github.com/asciidoctor
23
23
  :uri-repo: {uri-org}/asciidoctor
@@ -1,6 +1,6 @@
1
1
  = Asciidoctor
2
2
  Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>; Ryan Waldron <https://github.com/erebor[@erebor]>
3
- v2.0.3, 2019-03-28
3
+ v2.0.4, 2019-03-31
4
4
  // settings:
5
5
  :idprefix:
6
6
  :idseparator: -
@@ -17,7 +17,7 @@ ifdef::env-github[]
17
17
  :warning-caption: :warning:
18
18
  endif::[]
19
19
  // Variables:
20
- :release-version: 2.0.3
20
+ :release-version: 2.0.4
21
21
  // URIs:
22
22
  :uri-org: https://github.com/asciidoctor
23
23
  :uri-repo: {uri-org}/asciidoctor
@@ -1,6 +1,6 @@
1
1
  = Asciidoctor
2
2
  Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>; Ryan Waldron <https://github.com/erebor[@erebor]>
3
- v2.0.3, 2019-03-28
3
+ v2.0.4, 2019-03-31
4
4
  // settings:
5
5
  :page-layout: base
6
6
  :idprefix:
@@ -18,7 +18,7 @@ ifdef::env-github[]
18
18
  :warning-caption: :warning:
19
19
  endif::[]
20
20
  // Variables:
21
- :release-version: 2.0.3
21
+ :release-version: 2.0.4
22
22
  // URIs:
23
23
  :uri-org: https://github.com/asciidoctor
24
24
  :uri-repo: {uri-org}/asciidoctor
@@ -1,6 +1,6 @@
1
1
  = Asciidoctor
2
2
  Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>; Ryan Waldron <https://github.com/erebor[@erebor]>
3
- v2.0.3, 2019-03-28
3
+ v2.0.4, 2019-03-31
4
4
  // settings:
5
5
  :page-layout: base
6
6
  :idprefix:
@@ -18,7 +18,7 @@ ifdef::env-github[]
18
18
  :warning-caption: :warning:
19
19
  endif::[]
20
20
  // Variables:
21
- :release-version: 2.0.3
21
+ :release-version: 2.0.4
22
22
  // URIs:
23
23
  :uri-org: https://github.com/asciidoctor
24
24
  :uri-repo: {uri-org}/asciidoctor
@@ -1,6 +1,6 @@
1
1
  = Asciidoctor
2
2
  Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>; Ryan Waldron <https://github.com/erebor[@erebor]>
3
- v2.0.3, 2019-03-28
3
+ v2.0.4, 2019-03-31
4
4
  // settings:
5
5
  :idprefix:
6
6
  :idseparator: -
@@ -17,7 +17,7 @@ ifdef::env-github[]
17
17
  :warning-caption: :warning:
18
18
  endif::[]
19
19
  // Variables:
20
- :release-version: 2.0.3
20
+ :release-version: 2.0.4
21
21
  // URIs:
22
22
  :uri-org: https://github.com/asciidoctor
23
23
  :uri-repo: {uri-org}/asciidoctor
@@ -35,7 +35,7 @@ ifdef::env-site[:uri-project: link:]
35
35
  :uri-contributors: {uri-repo}/graphs/contributors
36
36
  :uri-rel-file-base: link:
37
37
  :uri-rel-tree-base: link:
38
- ifdef::env-site[]
38
+ ifdef::env-site,env-yard[]
39
39
  :uri-rel-file-base: {uri-repo}/blob/master/
40
40
  :uri-rel-tree-base: {uri-repo}/tree/master/
41
41
  endif::[]
@@ -51,7 +51,7 @@ endif::[]
51
51
  :uri-install-docker: https://github.com/asciidoctor/docker-asciidoctor
52
52
  //:uri-install-doc: {uri-docs}/install-toolchain
53
53
  :uri-install-macos-doc: {uri-docs}/install-asciidoctor-macos
54
- :uri-render-doc: {uri-docs}/render-documents
54
+ :uri-convert-doc: {uri-docs}/convert-documents
55
55
  :uri-themes-doc: {uri-docs}/produce-custom-themes-using-asciidoctor-stylesheet-factory
56
56
  :uri-gitscm-repo: https://github.com/git/git-scm.com
57
57
  :uri-prototype: {uri-gitscm-repo}/commits/master/lib/asciidoc.rb
@@ -64,12 +64,14 @@ endif::[]
64
64
  :image-uri-screenshot: https://raw.githubusercontent.com/asciidoctor/asciidoctor/master/screenshot.png
65
65
 
66
66
  {uri-project}[Asciidoctor] is a _fast_, {uri-license}[open source] text processor and publishing toolchain for converting {uri-what-is-asciidoc}[AsciiDoc] content to HTML5, DocBook, PDF, and other formats.
67
- Asciidoctor is written in Ruby and runs on all major operation systems.
68
- To simplify installation, Asciidoctor is packaged and distributed as a gem to {uri-rubygem}[RubyGems.org] and is packaged for popular Linux distributions and macOS.
69
- Asciidoctor can also be run in a JVM using {uri-asciidoctorj}[AsciidoctorJ] or in any JavaScript environment using {uri-asciidoctorjs}[Asciidoctor.js].
67
+ Asciidoctor is written in Ruby and runs on all major operating systems.
70
68
  The Asciidoctor project is {uri-repo}[hosted on GitHub].
71
69
 
72
- ifndef::env-site[]
70
+ To simplify installation, Asciidoctor is packaged and distributed as a RubyGem (aka gem) to {uri-rubygem}[RubyGems.org].
71
+ It's also distributed as a package for popular Linux distributions and macOS.
72
+ In addition to running on Ruby, Asciidoctor can be executed on a JVM using {uri-asciidoctorj}[AsciidoctorJ] or in any JavaScript environment (including the browser) using {uri-asciidoctorjs}[Asciidoctor.js].
73
+
74
+ ifndef::env-site,env-yard[]
73
75
  This document is also available in the following languages: +
74
76
  {uri-rel-file-base}README-zh_CN.adoc[汉语]
75
77
  |
@@ -88,23 +90,27 @@ endif::[]
88
90
  * {uri-docs}/asciidoc-syntax-quick-reference[AsciiDoc Syntax Reference]
89
91
 
90
92
  ifdef::status[]
91
- .*Project health*
92
- image:https://img.shields.io/travis/asciidoctor/asciidoctor/master.svg[Build Status (Travis CI), link=https://travis-ci.org/asciidoctor/asciidoctor]
93
- image:https://ci.appveyor.com/api/projects/status/ifplu67oxvgn6ceq/branch/master?svg=true&amp;passingText=green%20bar&amp;failingText=%23fail&amp;pendingText=building%2E%2E%2E[Build Status (AppVeyor), link=https://ci.appveyor.com/project/asciidoctor/asciidoctor]
94
- //image:https://img.shields.io/coveralls/asciidoctor/asciidoctor/master.svg[Coverage Status, link=https://coveralls.io/r/asciidoctor/asciidoctor]
95
- //image:https://codeclimate.com/github/asciidoctor/asciidoctor/badges/gpa.svg[Code Climate, link="https://codeclimate.com/github/asciidoctor/asciidoctor"]
96
- image:https://inch-ci.org/github/asciidoctor/asciidoctor.svg?branch=master[Inline docs, link="https://inch-ci.org/github/asciidoctor/asciidoctor"]
93
+ //.*Project health*
94
+ image:https://img.shields.io/travis/asciidoctor/asciidoctor/master.svg[Build Status (Travis CI),link=https://travis-ci.org/asciidoctor/asciidoctor]
95
+ image:https://ci.appveyor.com/api/projects/status/ifplu67oxvgn6ceq/branch/master?svg=true&amp;passingText=green%20bar&amp;failingText=%23fail&amp;pendingText=building%2E%2E%2E[Build Status (AppVeyor),link=https://ci.appveyor.com/project/asciidoctor/asciidoctor]
96
+ //image:https://img.shields.io/coveralls/asciidoctor/asciidoctor/master.svg[Coverage Status,link=https://coveralls.io/r/asciidoctor/asciidoctor]
97
+ //image:https://codeclimate.com/github/asciidoctor/asciidoctor/badges/gpa.svg[Code Climate,link=https://codeclimate.com/github/asciidoctor/asciidoctor]
98
+ image:https://inch-ci.org/github/asciidoctor/asciidoctor.svg?branch=master[Inline docs,link=https://inch-ci.org/github/asciidoctor/asciidoctor]
99
+ image:https://img.shields.io/badge/rubydoc.info-{release-version}-blue.svg[library (API) docs,link=https://www.rubydoc.info/gems/asciidoctor/{release-version}]
97
100
  endif::[]
98
101
 
99
102
  == Sponsors
100
103
 
101
- We want to recognize our generous sponsors, without whose support Asciidoctor would not be possible.
102
- Thank you sponsors for your dedication to improving the state of technical documentation!
104
+ We want to recognize our {uri-project}/supporters[sponsors] for their commitment to improving the state of technical documentation by supporting this project.
105
+ Thank you sponsors!
106
+ Without your generous support, Asciidoctor would not be possible.
103
107
 
108
+ ifndef::env-site,env-yard[]
104
109
  Major funding for Asciidoctor is provided by our *Change Maker*, https://opendevise.com[OpenDevise], our *Strategy Sponsors*, https://www.khronos.org/[Khronos Group] and Linda Roberts, and our *Pull Request Backers*, Brian Dominick, Guillaume Grossetie, and Abel Salgado Romero.
105
- Additional funding is provided by our https://asciidoctor.org/supporters[Community Backers].
110
+ Additional funding is provided by the supporters listed on our {uri-project}/supporters[Community Backers] page.
111
+ endif::[]
106
112
 
107
- You can support this project by becoming a sponsor on https://opencollective.com/asciidoctor[OpenCollective].
113
+ You can support this project by becoming a sponsor through https://opencollective.com/asciidoctor[OpenCollective].
108
114
 
109
115
  == The Big Picture
110
116
 
@@ -118,8 +124,8 @@ image::{image-uri-screenshot}[Preview of AsciiDoc source and corresponding rende
118
124
  Asciidoctor reads and parses text written in the AsciiDoc syntax, then feeds the parse tree to a set of built-in converters to produce HTML5, DocBook 5, and man(ual) page output.
119
125
  You have the option of using your own converter or loading {uri-tilt}[Tilt]-supported templates to customize the generated output or produce additional formats.
120
126
 
121
- Asciidoctor is a drop-in replacement for the original AsciiDoc Python processor (`asciidoc.py`).
122
- The Asciidoctor test suite has {uri-tests}[> 2,000 tests] to ensure compatibility with the AsciiDoc syntax.
127
+ Asciidoctor is a drop-in replacement for its predecessor, AsciiDoc Python (`asciidoc.py`).
128
+ The Asciidoctor test suite has {uri-tests}[> 2,350 tests] to ensure compatibility with the AsciiDoc syntax.
123
129
 
124
130
  In addition to the classic AsciiDoc syntax, Asciidoctor recognizes additional markup and formatting options, such as font-based icons (e.g., `+icon:fire[]+`) and UI elements (e.g., `+button:[Save]+`).
125
131
  Asciidoctor also offers a modern, responsive theme based on {uri-foundation}[Foundation] to style the HTML5 output.
@@ -352,7 +358,7 @@ The `asciidoctor` {uri-manpage}[man page] provides a complete reference of the c
352
358
 
353
359
  Refer to the following resources to learn more about how to use the `asciidoctor` command.
354
360
 
355
- * {uri-render-doc}[How do I convert a document?]
361
+ * {uri-convert-doc}[How do I convert a document?]
356
362
  * {uri-themes-doc}[How do I use the Asciidoctor stylesheet factory to produce custom themes?]
357
363
 
358
364
  === Ruby API
@@ -1502,7 +1502,7 @@ module Asciidoctor
1502
1502
  end
1503
1503
  end
1504
1504
 
1505
- # Alias render to convert to maintain backwards compatibility
1505
+ # Deprecated: Use {Asciidoctor.convert} instead.
1506
1506
  alias render convert
1507
1507
 
1508
1508
  # Public: Parse the contents of the AsciiDoc source file into an
@@ -1519,7 +1519,7 @@ module Asciidoctor
1519
1519
  ::File.open(filename, FILE_READ_MODE) {|file| self.convert file, options }
1520
1520
  end
1521
1521
 
1522
- # Alias render_file to convert_file to maintain backwards compatibility
1522
+ # Deprecated: Use {Asciidoctor.convert_file} instead.
1523
1523
  alias render_file convert_file
1524
1524
 
1525
1525
  # Internal: Automatically load the Asciidoctor::Extensions module.
@@ -74,7 +74,7 @@ class AbstractBlock < AbstractNode
74
74
  converter.convert self
75
75
  end
76
76
 
77
- # Alias render to convert to maintain backwards compatibility
77
+ # Deprecated: Use {AbstractBlock#convert} instead.
78
78
  alias render convert
79
79
 
80
80
  # Public: Get the converted result of the child blocks by converting the
@@ -432,8 +432,10 @@ class AbstractBlock < AbstractNode
432
432
  end
433
433
  end
434
434
 
435
+ protected
436
+
435
437
  # Internal: Performs the work for find_by, but does not handle the StopIteration exception.
436
- protected def find_by_internal selector = {}, result = [], &block
438
+ def find_by_internal selector = {}, result = [], &block
437
439
  if ((any_context = (context_selector = selector[:context]) ? nil : true) || context_selector == @context) &&
438
440
  (!(style_selector = selector[:style]) || style_selector == @style) &&
439
441
  (!(role_selector = selector[:role]) || (has_role? role_selector)) &&
@@ -3,15 +3,14 @@ module Asciidoctor
3
3
  # A module for defining converters that are used to convert {AbstractNode} objects in a parsed AsciiDoc document to an
4
4
  # output (aka backend) format such as HTML or DocBook.
5
5
  #
6
- # Implementing a custom converter involves:
6
+ # A {Converter} is typically instantiated each time an AsciiDoc document is processed (i.e., parsed and converted).
7
+ # Implementing a custom converter entails:
7
8
  #
8
9
  # * Including the {Converter} module in a converter class and implementing the {Converter#convert} method or extending
9
10
  # the {Converter::Base Base} class and implementing the dispatch methods that map to each node.
10
11
  # * Optionally registering the converter with one or more backend names statically using the +register_for+ DSL method
11
12
  # contributed by the {Converter::Config Config} module.
12
13
  #
13
- # {Converter} instances are typically instantiated for each instance of a parsed AsciiDoc document.
14
- #
15
14
  # Examples
16
15
  #
17
16
  # class TextConverter
@@ -32,7 +31,7 @@ module Asciidoctor
32
31
  # end
33
32
  # end
34
33
  # end
35
- # puts Asciidoctor.convert_file 'sample.adoc', backend: :text
34
+ # puts Asciidoctor.convert_file 'sample.adoc', backend: :text, safe: :safe
36
35
  #
37
36
  # class Html5Converter < (Asciidoctor::Converter.for 'html5')
38
37
  # register_for 'html5'
@@ -40,7 +39,7 @@ module Asciidoctor
40
39
  # %(<p>#{node.content}</p>)
41
40
  # end
42
41
  # end
43
- # puts Asciidoctor.convert_file 'sample.adoc'
42
+ # puts Asciidoctor.convert_file 'sample.adoc', safe: :safe
44
43
  module Converter
45
44
  autoload :CompositeConverter, %(#{__dir__}/converter/composite)
46
45
  autoload :TemplateConverter, %(#{__dir__}/converter/template)
@@ -83,6 +82,23 @@ module Converter
83
82
  true
84
83
  end
85
84
 
85
+ # Public: Derive backend traits (basebackend, filetype, outfilesuffix, htmlsyntax) from the given backend.
86
+ #
87
+ # backend - the String backend from which to derive the traits
88
+ #
89
+ # Returns the backend traits for the given backend as a [Hash].
90
+ def self.derive_backend_traits backend
91
+ return {} unless backend
92
+ if (t_outfilesuffix = DEFAULT_EXTENSIONS[(t_basebackend = backend.sub TrailingDigitsRx, '')])
93
+ t_filetype = t_outfilesuffix.slice 1, t_outfilesuffix.length
94
+ else
95
+ t_outfilesuffix = %(.#{t_filetype = t_basebackend})
96
+ end
97
+ t_filetype == 'html' ?
98
+ { basebackend: t_basebackend, filetype: t_filetype, htmlsyntax: 'html', outfilesuffix: t_outfilesuffix } :
99
+ { basebackend: t_basebackend, filetype: t_filetype, outfilesuffix: t_outfilesuffix }
100
+ end
101
+
86
102
  module BackendTraits
87
103
  def basebackend value = nil
88
104
  value ? (backend_traits[:basebackend] = value) : backend_traits[:basebackend]
@@ -113,25 +129,14 @@ module Converter
113
129
  end
114
130
 
115
131
  def backend_traits
116
- @backend_traits ||= derive_backend_traits
132
+ @backend_traits ||= Converter.derive_backend_traits @backend
117
133
  end
118
134
 
119
135
  alias backend_info backend_traits
120
136
 
121
- private def derive_backend_traits
122
- BackendTraits.derive_backend_traits @backend
123
- end
124
-
137
+ # Deprecated: Use {Converter.derive_backend_traits} instead.
125
138
  def self.derive_backend_traits backend
126
- return {} unless backend
127
- if (t_outfilesuffix = DEFAULT_EXTENSIONS[(t_basebackend = backend.sub TrailingDigitsRx, '')])
128
- t_filetype = t_outfilesuffix.slice 1, t_outfilesuffix.length
129
- else
130
- t_outfilesuffix = %(.#{t_filetype = t_basebackend})
131
- end
132
- t_filetype == 'html' ?
133
- { basebackend: t_basebackend, filetype: t_filetype, htmlsyntax: 'html', outfilesuffix: t_outfilesuffix } :
134
- { basebackend: t_basebackend, filetype: t_filetype, outfilesuffix: t_outfilesuffix }
139
+ Converter.derive_backend_traits backend
135
140
  end
136
141
  end
137
142
 
@@ -142,7 +147,7 @@ module Converter
142
147
  # backends - One or more String backend names with which to associate this {Converter} class.
143
148
  #
144
149
  # Returns nothing.
145
- private def register_for *backends
150
+ def register_for *backends
146
151
  Converter.register self, *backends
147
152
  end
148
153
  end
@@ -241,7 +246,9 @@ module Converter
241
246
  registry.merge
242
247
  end
243
248
 
244
- private def registry
249
+ private
250
+
251
+ def registry
245
252
  raise ::NotImplementedError, %(#{Factory} subclass #{self.class} must implement the ##{__method__} method)
246
253
  end
247
254
  end
@@ -252,10 +259,10 @@ module Converter
252
259
  def initialize seed_registry = nil
253
260
  if seed_registry
254
261
  seed_registry.default = seed_registry.delete '*'
262
+ @registry = seed_registry
255
263
  else
256
- seed_registry = {}
264
+ @registry = {}
257
265
  end
258
- @registry = seed_registry
259
266
  end
260
267
 
261
268
  # Public: Unregister all Converter classes that are registered with this factory. Intended for testing only.
@@ -306,11 +313,11 @@ module Converter
306
313
 
307
314
  def for backend
308
315
  @@registry.fetch backend do
309
- PROVIDED[backend] ? @@mutex.synchronize do
316
+ PROVIDED[backend] ? (@@mutex.synchronize do
310
317
  # require is thread-safe, so no reason to refetch
311
318
  require PROVIDED[backend]
312
319
  @@registry[backend]
313
- end : catch_all
320
+ end) : catch_all
314
321
  end
315
322
  end
316
323
 
@@ -344,7 +351,9 @@ module Converter
344
351
  @registry.fetch(backend) { super }
345
352
  end
346
353
 
347
- private def catch_all
354
+ private
355
+
356
+ def catch_all
348
357
  @registry.default || super
349
358
  end
350
359
  end
@@ -357,9 +366,9 @@ module Converter
357
366
  #
358
367
  # Returns nothing.
359
368
  private_class_method def self.included into
360
- into.include BackendTraits
369
+ into.send :include, BackendTraits
361
370
  into.extend Config
362
- end
371
+ end || :included
363
372
 
364
373
  # An abstract base class for defining converters that can be used to convert {AbstractNode} objects in a parsed
365
374
  # AsciiDoc document to a backend format such as HTML or DocBook.
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  # NOTE remove once minimum required Ruby version is at least 2.4
3
- Float.prepend(Module.new do
3
+ # NOTE use `send :prepend` to be nice to Ruby 2.0
4
+ Float.send :prepend, (Module.new do
4
5
  def truncate *args
5
6
  if args.length == 1
6
7
  if (precision = Integer args.shift) == 0
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  # NOTE remove once minimum required Ruby version is at least 2.6
3
- Hash.prepend(Module.new do
3
+ # NOTE use `send :prepend` to be nice to Ruby 2.0
4
+ Hash.send :prepend, (Module.new do
4
5
  def merge *args
5
6
  (len = args.length) < 1 ? super({}) : (len > 1 ? args.inject(self) {|acc, arg| acc.merge arg } : (super args[0]))
6
7
  end
@@ -956,7 +956,7 @@ class Document < AbstractBlock
956
956
  output
957
957
  end
958
958
 
959
- # Alias render to convert to maintain backwards compatibility
959
+ # Deprecated: Use {Document#convert} instead.
960
960
  alias render convert
961
961
 
962
962
  # Public: Write the output to the specified file
@@ -1327,7 +1327,7 @@ class Document < AbstractBlock
1327
1327
  attrs['outfilesuffix'] = converter.outfilesuffix unless attribute_locked? 'outfilesuffix'
1328
1328
  end
1329
1329
  elsif converter
1330
- backend_traits = Converter::BackendTraits.derive_backend_traits new_backend
1330
+ backend_traits = Converter.derive_backend_traits new_backend
1331
1331
  new_basebackend = backend_traits[:basebackend]
1332
1332
  new_filetype = backend_traits[:filetype]
1333
1333
  if init
@@ -32,7 +32,7 @@ class Inline < AbstractNode
32
32
  converter.convert self
33
33
  end
34
34
 
35
- # Alias render to convert to maintain backwards compatibility
35
+ # Deprecated: Use {Inline#convert} instead.
36
36
  alias render convert
37
37
 
38
38
  # Public: Returns the converted alt text for this inline image.
@@ -31,7 +31,7 @@ class List < AbstractBlock
31
31
  end
32
32
  end
33
33
 
34
- # Alias render to convert to maintain backwards compatibility
34
+ # Deprecated: Use {List#convert} instead.
35
35
  alias render convert
36
36
 
37
37
  def to_s
@@ -112,7 +112,7 @@ module Logging
112
112
  # Returns nothing
113
113
  private_class_method def self.included into
114
114
  into.extend Logging
115
- end
115
+ end || :included
116
116
 
117
117
  def logger
118
118
  LoggerManager.logger
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Asciidoctor
3
- VERSION = '2.0.3'
3
+ VERSION = '2.0.4'
4
4
  end
@@ -1,13 +1,13 @@
1
1
  '\" t
2
2
  .\" Title: asciidoctor
3
3
  .\" Author: Dan Allen, Sarah White, Ryan Waldron
4
- .\" Generator: Asciidoctor 2.0.3
5
- .\" Date: 2019-03-28
4
+ .\" Generator: Asciidoctor 2.0.4
5
+ .\" Date: 2019-03-31
6
6
  .\" Manual: Asciidoctor Manual
7
- .\" Source: Asciidoctor 2.0.3
7
+ .\" Source: Asciidoctor 2.0.4
8
8
  .\" Language: English
9
9
  .\"
10
- .TH "ASCIIDOCTOR" "1" "2019-03-28" "Asciidoctor 2.0.3" "Asciidoctor Manual"
10
+ .TH "ASCIIDOCTOR" "1" "2019-03-31" "Asciidoctor 2.0.4" "Asciidoctor Manual"
11
11
  .ie \n(.g .ds Aq \(aq
12
12
  .el .ds Aq '
13
13
  .ss \n[.ss] 0
@@ -2,7 +2,7 @@
2
2
  Dan Allen; Sarah White; Ryan Waldron
3
3
  :doctype: manpage
4
4
  :man manual: Asciidoctor Manual
5
- :man source: Asciidoctor 2.0.3
5
+ :man source: Asciidoctor 2.0.4
6
6
  :page-layout: base
7
7
 
8
8
  == NAME
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Allen
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2019-03-28 00:00:00.000000000 Z
16
+ date: 2019-03-31 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: asciimath