asciidoctor 2.0.8 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +12 -1
- data/README-de.adoc +3 -3
- data/README-fr.adoc +2 -2
- data/README-jp.adoc +2 -2
- data/README-zh_CN.adoc +2 -2
- data/README.adoc +2 -2
- data/lib/asciidoctor/abstract_block.rb +6 -4
- data/lib/asciidoctor/abstract_node.rb +2 -2
- data/lib/asciidoctor/converter/html5.rb +1 -1
- data/lib/asciidoctor/document.rb +1 -2
- data/lib/asciidoctor/inline.rb +1 -1
- data/lib/asciidoctor/parser.rb +3 -2
- data/lib/asciidoctor/rx.rb +2 -1
- data/lib/asciidoctor/substitutors.rb +4 -1
- data/lib/asciidoctor/version.rb +1 -1
- data/man/asciidoctor.1 +4 -4
- data/man/asciidoctor.adoc +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d06b9c81c6dd7e6df2024477e3142589c7723c745558780ba22417b6a473153
|
4
|
+
data.tar.gz: 13bdf319bef92feec8faca9750d2a946a08afbae2046b97bffd6cf2cc3e96c10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c10d1ac31e307c48d0b370cfcea8d4aac04eed0a02d916dea23253cee30214fd2ffb63e22ae9c273f64ec82f44c7b8c94b6d41077ea21bf221b80916f52ca9d6
|
7
|
+
data.tar.gz: 063437b88020715aebd3388ec6e9c68971b404a4441466b4c2e16546bbbeb7aa7dbb4b29714790f1559b9b277b679cafd0f60633483448b5d140603e949c3d0b
|
data/CHANGELOG.adoc
CHANGED
@@ -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::
|
data/README-de.adoc
CHANGED
@@ -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
|
+
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.
|
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
|
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.
|
data/README-fr.adoc
CHANGED
@@ -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
|
+
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.
|
20
|
+
:release-version: 2.0.9
|
21
21
|
// URIs:
|
22
22
|
:uri-org: https://github.com/asciidoctor
|
23
23
|
:uri-repo: {uri-org}/asciidoctor
|
data/README-jp.adoc
CHANGED
@@ -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
|
+
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.
|
21
|
+
:release-version: 2.0.9
|
22
22
|
// URIs:
|
23
23
|
:uri-org: https://github.com/asciidoctor
|
24
24
|
:uri-repo: {uri-org}/asciidoctor
|
data/README-zh_CN.adoc
CHANGED
@@ -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
|
+
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.
|
21
|
+
:release-version: 2.0.9
|
22
22
|
// URIs:
|
23
23
|
:uri-org: https://github.com/asciidoctor
|
24
24
|
:uri-repo: {uri-org}/asciidoctor
|
data/README.adoc
CHANGED
@@ -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
|
+
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.
|
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
|
374
|
-
# caption_context - The Symbol context to use when resolving caption-related attributes.
|
375
|
-
#
|
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
|
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
|
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
|
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
|
data/lib/asciidoctor/document.rb
CHANGED
@@ -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
|
612
|
+
@catalog[type] << (type == :images ? (ImageReference.new value, @attributes['imagesdir']) : value) if @options[:catalog_assets]
|
614
613
|
end
|
615
614
|
end
|
616
615
|
|
data/lib/asciidoctor/inline.rb
CHANGED
data/lib/asciidoctor/parser.rb
CHANGED
@@ -596,7 +596,8 @@ class Parser
|
|
596
596
|
end
|
597
597
|
end
|
598
598
|
if blk_ctx == :image
|
599
|
-
document.register :images,
|
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
|
1536
|
+
buffer[detached_continuation] = '' if detached_continuation
|
1536
1537
|
|
1537
1538
|
until buffer.empty?
|
1538
1539
|
# strip trailing blank lines to prevent empty blocks
|
data/lib/asciidoctor/rx.rb
CHANGED
@@ -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
|
-
|
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
|
data/lib/asciidoctor/version.rb
CHANGED
data/man/asciidoctor.1
CHANGED
@@ -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.
|
5
|
-
.\" Date: 2019-04-
|
4
|
+
.\" Generator: Asciidoctor 2.0.9
|
5
|
+
.\" Date: 2019-04-30
|
6
6
|
.\" Manual: Asciidoctor Manual
|
7
|
-
.\" Source: Asciidoctor 2.0.
|
7
|
+
.\" Source: Asciidoctor 2.0.9
|
8
8
|
.\" Language: English
|
9
9
|
.\"
|
10
|
-
.TH "ASCIIDOCTOR" "1" "2019-04-
|
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
|
data/man/asciidoctor.adoc
CHANGED