asciidoctor 2.0.8 → 2.0.9

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: 1ef189b83754a55b816f7a460e35f774c88caaad9ff226ce55c1c52cbc412164
4
- data.tar.gz: d1df841d432830e57c6e09fd01d3dd862e8d15f4e3f5c6c18dcb1ee5ce837ae2
3
+ metadata.gz: 7d06b9c81c6dd7e6df2024477e3142589c7723c745558780ba22417b6a473153
4
+ data.tar.gz: 13bdf319bef92feec8faca9750d2a946a08afbae2046b97bffd6cf2cc3e96c10
5
5
  SHA512:
6
- metadata.gz: 0166e0df2ecdfef13e74befcdcc30bc4eaf52a0df358438350a5891c8f4ffa1346bc2d5d2c8be76d40fa931e88017be6748dd34cbd9184583ad631cfc91aa205
7
- data.tar.gz: 2eaf29c5ac50b229214da2bf11f933767fc9bf43d3ff6b86d859501e1b1c446945d2845825cb4f5010e891a1c5af47e552f170533d3f4c48eaa19d7f1e30ff30
6
+ metadata.gz: c10d1ac31e307c48d0b370cfcea8d4aac04eed0a02d916dea23253cee30214fd2ffb63e22ae9c273f64ec82f44c7b8c94b6d41077ea21bf221b80916f52ca9d6
7
+ data.tar.gz: 063437b88020715aebd3388ec6e9c68971b404a4441466b4c2e16546bbbeb7aa7dbb4b29714790f1559b9b277b679cafd0f60633483448b5d140603e949c3d0b
@@ -14,6 +14,18 @@ This document provides a high-level view of the changes introduced in Asciidocto
14
14
  For a detailed view of what has changed, refer to the {uri-repo}/commits/master[commit history] on GitHub.
15
15
 
16
16
  // tag::compact[]
17
+ == 2.0.9 (2019-04-30) - @mojavelinux
18
+
19
+ Bug Fixes::
20
+
21
+ * process multiple single-item menu macros in same line (#3279)
22
+ * register images in catalog correctly (#3283)
23
+ * rename AbstractNode#options method to AbstractNode#enabled_options so it doesn't get shadowed by Document#options (#3282)
24
+ * don't fail to convert document if alt attribute is not set on block or inline image (typically by an extension)
25
+ * fix lineno of source location on blocks that follow a detached list continuation (#3281)
26
+ * assume inline image type is "image" if not set (typically by an extension)
27
+
28
+ // end::compact[]
17
29
  == 2.0.8 (2019-04-22) - @mojavelinux
18
30
 
19
31
  Bug Fixes::
@@ -31,7 +43,6 @@ Improvements::
31
43
  * use module_function keyword to define methods in Helpers
32
44
  * move regular expression definitions to separate source file (internal change)
33
45
 
34
- // end::compact[]
35
46
  == 2.0.7 (2019-04-13) - @mojavelinux
36
47
 
37
48
  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.8, 2019-04-22
3
+ v2.0.9, 2019-04-30
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.8
20
+ :release-version: 2.0.9
21
21
  // URIs:
22
22
  :uri-org: https://github.com/asciidoctor
23
23
  :uri-repo: {uri-org}/asciidoctor
@@ -460,7 +460,7 @@ Siehe die {uri-license}[LIZENZ] für den vollen Lizenztext.
460
460
 
461
461
  == Authoren
462
462
 
463
- *Asciidoctor* wird von https://github.com/mojavelinux[Dan Allen] und https://github.com/graphitefriction[Sarah White] geleitet und hat Beiträge von {uri-contributors}[vielen Personen} in Asciidoctors großartiger Gemeinschaft erhalten.
463
+ *Asciidoctor* wird von https://github.com/mojavelinux[Dan Allen] und https://github.com/graphitefriction[Sarah White] geleitet und hat Beiträge von {uri-contributors}[vielen Personen] in Asciidoctors großartiger Gemeinschaft erhalten.
464
464
  Das Projekt wurde 2012 von https://github.com/erebor[Ryan Waldron] initiiert und basiert auf einem {uri-prototype}[Prototyp] von https://github.com/nickh[Nick Hengeveld].
465
465
 
466
466
  *AsciiDoc* wurde von Stuart Rackham gegründet und hat Beiträge von vielen Personen aus der AsciiDoc-Community erhalten.
@@ -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.8, 2019-04-22
3
+ v2.0.9, 2019-04-30
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.8
20
+ :release-version: 2.0.9
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.8, 2019-04-22
3
+ v2.0.9, 2019-04-30
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.8
21
+ :release-version: 2.0.9
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.8, 2019-04-22
3
+ v2.0.9, 2019-04-30
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.8
21
+ :release-version: 2.0.9
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.8, 2019-04-22
3
+ v2.0.9, 2019-04-30
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.8
20
+ :release-version: 2.0.9
21
21
  // URIs:
22
22
  :uri-org: https://github.com/asciidoctor
23
23
  :uri-repo: {uri-org}/asciidoctor
@@ -223,6 +223,8 @@ class AbstractBlock < AbstractNode
223
223
  text = sub_specialchars text
224
224
  (ReplaceableTextRx.match? text) ? (sub_replacements text) : text
225
225
  end
226
+ else
227
+ ''
226
228
  end
227
229
  end
228
230
 
@@ -370,13 +372,13 @@ class AbstractBlock < AbstractNode
370
372
  # The parts of a complete caption are: <prefix> <number>. <title>
371
373
  # This partial caption represents the part the precedes the title.
372
374
  #
373
- # value - The explicit String caption to assign to this block (default: nil).
374
- # caption_context - The Symbol context to use when resolving caption-related attributes.
375
- # If not provided, the name of the context for this block is used.
375
+ # value - The String caption to assign to this block or nil to use document attribute.
376
+ # caption_context - The Symbol context to use when resolving caption-related attributes. If not provided, the name of
377
+ # the context for this block is used. Only certain contexts allow the caption to be looked up.
376
378
  # (default: @context)
377
379
  #
378
380
  # Returns nothing.
379
- def assign_caption value = nil, caption_context = @context
381
+ def assign_caption value, caption_context = @context
380
382
  unless @caption || !@title || (@caption = value || @document.attributes['caption'])
381
383
  if (attr_name = CAPTION_ATTR_NAMES[caption_context]) && (prefix = @document.attributes[attr_name])
382
384
  @caption = %(#{prefix} #{@numeral = @document.increment_and_store_counter %(#{caption_context}-number), self}. )
@@ -161,10 +161,10 @@ class AbstractNode
161
161
  nil
162
162
  end
163
163
 
164
- # Public: Retrieve the Set of option names that are set on this node
164
+ # Public: Retrieve the Set of option names that are enabled on this node
165
165
  #
166
166
  # Returns a [Set] of option names
167
- def options
167
+ def enabled_options
168
168
  ::Set.new.tap {|accum| @attributes.each_key {|k| accum << (k.slice 0, k.length - 7) if k.to_s.end_with? '-option' } }
169
169
  end
170
170
 
@@ -1163,7 +1163,7 @@ Your browser does not support the video tag.
1163
1163
  end
1164
1164
 
1165
1165
  def convert_inline_image node
1166
- if (type = node.type) == 'icon' && (node.document.attr? 'icons', 'font')
1166
+ if (type = node.type || 'image') == 'icon' && (node.document.attr? 'icons', 'font')
1167
1167
  class_attr_val = %(fa fa-#{node.target})
1168
1168
  { 'size' => 'fa-', 'rotate' => 'fa-rotate-', 'flip' => 'fa-flip-' }.each do |key, prefix|
1169
1169
  class_attr_val = %(#{class_attr_val} #{prefix}#{node.attr key}) if node.attr? key
@@ -606,11 +606,10 @@ class Document < AbstractBlock
606
606
  when :refs
607
607
  @catalog[:refs][value[0]] ||= (ref = value[1])
608
608
  ref
609
- #when :footnotes, :indexterms
610
609
  when :footnotes
611
610
  @catalog[type] << value
612
611
  else
613
- @catalog[type] << (type == :images ? (ImageReference.new value[0], value[1]) : value) if @options[:catalog_assets]
612
+ @catalog[type] << (type == :images ? (ImageReference.new value, @attributes['imagesdir']) : value) if @options[:catalog_assets]
614
613
  end
615
614
  end
616
615
 
@@ -39,7 +39,7 @@ class Inline < AbstractNode
39
39
  #
40
40
  # Returns the [String] value of the alt attribute.
41
41
  def alt
42
- attr 'alt'
42
+ (attr 'alt') || ''
43
43
  end
44
44
 
45
45
  # For a reference node (:ref or :bibref), the text is the reftext (and the reftext attribute is not set).
@@ -596,7 +596,8 @@ class Parser
596
596
  end
597
597
  end
598
598
  if blk_ctx == :image
599
- document.register :images, [target, (attributes['imagesdir'] = doc_attrs['imagesdir'])]
599
+ document.register :images, target
600
+ attributes['imagesdir'] = doc_attrs['imagesdir']
600
601
  # NOTE style is the value of the first positional attribute in the block attribute line
601
602
  attributes['alt'] ||= style || (attributes['default-alt'] = Helpers.basename(target, true).tr('_-', ' '))
602
603
  unless (scaledwidth = attributes.delete 'scaledwidth').nil_or_empty?
@@ -1532,7 +1533,7 @@ class Parser
1532
1533
 
1533
1534
  reader.unshift_line this_line if this_line
1534
1535
 
1535
- buffer.delete_at detached_continuation if detached_continuation
1536
+ buffer[detached_continuation] = '' if detached_continuation
1536
1537
 
1537
1538
  until buffer.empty?
1538
1539
  # strip trailing blank lines to prevent empty blocks
@@ -547,10 +547,11 @@ module Asciidoctor
547
547
  # Examples
548
548
  #
549
549
  # menu:File[Save As...]
550
+ # menu:Edit[]
550
551
  # menu:View[Page Style > No Style]
551
552
  # menu:View[Page Style, No Style]
552
553
  #
553
- InlineMenuMacroRx = /\\?menu:(#{CG_WORD}|[#{CC_WORD}&][^\n\[]*[^\s\[])\[ *(#{CC_ALL}*?[^\\])?\]/m
554
+ InlineMenuMacroRx = /\\?menu:(#{CG_WORD}|[#{CC_WORD}&][^\n\[]*[^\s\[])\[ *(?:|(#{CC_ALL}*?[^\\]))?\]/m
554
555
 
555
556
  # Matches an implicit menu inline macro.
556
557
  #
@@ -422,7 +422,10 @@ module Substitutors
422
422
  end
423
423
  target = $1
424
424
  attrs = parse_attributes $2, posattrs, unescape_input: true
425
- doc.register :images, [target, (attrs['imagesdir'] = doc_attrs['imagesdir'])] unless type == 'icon'
425
+ unless type == 'icon'
426
+ doc.register :images, target
427
+ attrs['imagesdir'] = doc_attrs['imagesdir']
428
+ end
426
429
  attrs['alt'] ||= (attrs['default-alt'] = Helpers.basename(target, true).tr('_-', ' '))
427
430
  Inline.new(self, :image, nil, type: type, target: target, attributes: attrs).convert
428
431
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Asciidoctor
3
- VERSION = '2.0.8'
3
+ VERSION = '2.0.9'
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.8
5
- .\" Date: 2019-04-22
4
+ .\" Generator: Asciidoctor 2.0.9
5
+ .\" Date: 2019-04-30
6
6
  .\" Manual: Asciidoctor Manual
7
- .\" Source: Asciidoctor 2.0.8
7
+ .\" Source: Asciidoctor 2.0.9
8
8
  .\" Language: English
9
9
  .\"
10
- .TH "ASCIIDOCTOR" "1" "2019-04-22" "Asciidoctor 2.0.8" "Asciidoctor Manual"
10
+ .TH "ASCIIDOCTOR" "1" "2019-04-30" "Asciidoctor 2.0.9" "Asciidoctor Manual"
11
11
  .ie \n(.g .ds Aq \(aq
12
12
  .el .ds Aq '
13
13
  .ss \n[.ss] 0
@@ -1,7 +1,7 @@
1
1
  = asciidoctor(1)
2
2
  Dan Allen; Sarah White; Ryan Waldron
3
3
  :doctype: manpage
4
- :release-version: 2.0.8
4
+ :release-version: 2.0.9
5
5
  :man manual: Asciidoctor Manual
6
6
  :man source: Asciidoctor {release-version}
7
7
  :page-layout: base
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.8
4
+ version: 2.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Allen