asciidoctor 2.0.1 → 2.0.2
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 +7 -0
- data/README-de.adoc +2 -2
- 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/data/reference/syntax.adoc +2 -2
- data/lib/asciidoctor.rb +1 -1
- data/lib/asciidoctor/abstract_block.rb +11 -13
- data/lib/asciidoctor/converter/template.rb +1 -1
- data/lib/asciidoctor/extensions.rb +1 -1
- data/lib/asciidoctor/helpers.rb +1 -1
- data/lib/asciidoctor/list.rb +4 -20
- data/lib/asciidoctor/parser.rb +34 -39
- data/lib/asciidoctor/table.rb +8 -0
- data/lib/asciidoctor/version.rb +1 -1
- data/man/asciidoctor.1 +4 -4
- data/man/asciidoctor.adoc +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2de6beb8308df8a84bde4b59be99d0d9d41474735279c6aaf6e6e76821d4bb6
|
4
|
+
data.tar.gz: 709d4f1eb62a388ef5e1e5c7991c024c126112894d842185f7ae2fdc8fbe924d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bac9d6c955c94dc8425ad7dc54706e3988e516cd156554d11ed1e1a85f4a8d77087bd2fbb407a630c547446dfbb6324c4a1babd226c144eee8df0c9ddd52e60
|
7
|
+
data.tar.gz: 7405db9ddcd871c6615862dc7bf0af440acca9b4120accdbd05493735b8de8c012a163dbaf731c074c8cfcc21c496d40e610e4aaaeb55aeba6613ef1941f06c6
|
data/CHANGELOG.adoc
CHANGED
@@ -13,6 +13,13 @@ 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.2 (2019-03-26) - @mojavelinux
|
17
|
+
|
18
|
+
Bug Fixes::
|
19
|
+
|
20
|
+
* apply verbatim substitutions to literal paragraphs attached to list item (#3205)
|
21
|
+
* implement #lines and #source methods on Table::Cell based on cell text (#3207)
|
22
|
+
|
16
23
|
== 2.0.1 (2019-03-25) - @mojavelinux
|
17
24
|
|
18
25
|
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.2, 2019-03-26
|
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.2
|
21
21
|
// URIs:
|
22
22
|
:uri-org: https://github.com/asciidoctor
|
23
23
|
:uri-repo: {uri-org}/asciidoctor
|
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.2, 2019-03-26
|
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.2
|
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.2, 2019-03-26
|
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.2
|
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.2, 2019-03-26
|
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.2
|
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.2, 2019-03-26
|
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.2
|
21
21
|
// URIs:
|
22
22
|
:uri-org: https://github.com/asciidoctor
|
23
23
|
:uri-repo: {uri-org}/asciidoctor
|
data/data/reference/syntax.adoc
CHANGED
@@ -37,10 +37,10 @@ TIP: Convert this document using the `asciidoctor` command to see the output pro
|
|
37
37
|
.Constrained (applied at word boundaries)
|
38
38
|
*strong importance* (aka bold)
|
39
39
|
_stress emphasis_ (aka italic)
|
40
|
-
`
|
40
|
+
`monospaced` (aka typewriter text)
|
41
41
|
"`double`" and '`single`' typographic quotes
|
42
42
|
+passthrough text+ (substitutions disabled)
|
43
|
-
`+literal
|
43
|
+
`+literal text+` (monospaced with substitutions disabled)
|
44
44
|
|
45
45
|
.Unconstrained (applied anywhere)
|
46
46
|
**C**reate+**R**ead+**U**pdate+**D**elete
|
data/lib/asciidoctor.rb
CHANGED
@@ -293,7 +293,7 @@ module Asciidoctor
|
|
293
293
|
DELIMITED_BLOCK_HEADS = {}.tap {|accum| DELIMITED_BLOCKS.each_key {|k| accum[k.slice 0, 2] = true } }
|
294
294
|
DELIMITED_BLOCK_TAILS = {}.tap {|accum| DELIMITED_BLOCKS.each_key {|k| accum[k] = k[k.length - 1] if k.length == 4 } }
|
295
295
|
|
296
|
-
|
296
|
+
CAPTION_ATTR_NAMES = { example: 'example-caption', image: 'figure-caption', listing: 'listing-caption', table: 'table-caption' }
|
297
297
|
|
298
298
|
LAYOUT_BREAK_CHARS = {
|
299
299
|
'\'' => :thematic_break,
|
@@ -32,9 +32,6 @@ class AbstractBlock < AbstractNode
|
|
32
32
|
# Public: Substitutions to be applied to content in this block.
|
33
33
|
attr_reader :subs
|
34
34
|
|
35
|
-
# Internal: Set the default subs applied to this block; used during block creation
|
36
|
-
attr_writer :default_subs
|
37
|
-
|
38
35
|
def initialize parent, context, opts = {}
|
39
36
|
super
|
40
37
|
@content_model = :compound
|
@@ -126,7 +123,7 @@ class AbstractBlock < AbstractNode
|
|
126
123
|
#
|
127
124
|
# Returns A Boolean indicating whether this Block has block content
|
128
125
|
def blocks?
|
129
|
-
|
126
|
+
@blocks.empty? ? false : true
|
130
127
|
end
|
131
128
|
|
132
129
|
# Public: Check whether this block has any child Section objects.
|
@@ -342,13 +339,13 @@ class AbstractBlock < AbstractNode
|
|
342
339
|
case xrefstyle
|
343
340
|
when 'full'
|
344
341
|
quoted_title = sub_placeholder (sub_quotes @document.compat_mode ? %q(``%s'') : '"`%s`"'), title
|
345
|
-
if @numeral && (
|
342
|
+
if @numeral && (caption_attr_name = CAPTION_ATTR_NAMES[@context]) && (prefix = @document.attributes[caption_attr_name])
|
346
343
|
%(#{prefix} #{@numeral}, #{quoted_title})
|
347
344
|
else
|
348
345
|
%(#{@caption.chomp '. '}, #{quoted_title})
|
349
346
|
end
|
350
347
|
when 'short'
|
351
|
-
if @numeral && (
|
348
|
+
if @numeral && (caption_attr_name = CAPTION_ATTR_NAMES[@context]) && (prefix = @document.attributes[caption_attr_name])
|
352
349
|
%(#{prefix} #{@numeral})
|
353
350
|
else
|
354
351
|
@caption.chomp '. '
|
@@ -372,16 +369,17 @@ class AbstractBlock < AbstractNode
|
|
372
369
|
# The parts of a complete caption are: <prefix> <number>. <title>
|
373
370
|
# This partial caption represents the part the precedes the title.
|
374
371
|
#
|
375
|
-
# value
|
376
|
-
#
|
377
|
-
#
|
378
|
-
#
|
372
|
+
# value - The explicit String caption to assign to this block (default: nil).
|
373
|
+
# caption_context - The Symbol context to use when resolving caption-related attributes.
|
374
|
+
# If not provided, the name of the context for this block is used.
|
375
|
+
# (default: @context)
|
379
376
|
#
|
380
377
|
# Returns nothing.
|
381
|
-
def assign_caption value = nil,
|
378
|
+
def assign_caption value = nil, caption_context = @context
|
382
379
|
unless @caption || !@title || (@caption = value || @document.attributes['caption'])
|
383
|
-
if (prefix = @document.attributes[
|
384
|
-
|
380
|
+
if (attr_name = CAPTION_ATTR_NAMES[caption_context]) && (prefix = @document.attributes[attr_name])
|
381
|
+
counter_name = caption_context == :image ? 'figure-number' : %(#{caption_context}-number)
|
382
|
+
@caption = %(#{prefix} #{@numeral = @document.increment_and_store_counter counter_name, self}. )
|
385
383
|
nil
|
386
384
|
end
|
387
385
|
end
|
@@ -71,7 +71,7 @@ class Converter::TemplateConverter < Converter::Base
|
|
71
71
|
end
|
72
72
|
case opts[:template_cache]
|
73
73
|
when true
|
74
|
-
logger.warn 'gem \'concurrent-ruby\' is not
|
74
|
+
logger.warn 'optional gem \'concurrent-ruby\' is not available. This gem is recommended when using the default template cache.' unless defined? ::Concurrent::Hash
|
75
75
|
@caches = self.class.caches
|
76
76
|
when ::Hash
|
77
77
|
@caches = opts[:template_cache]
|
@@ -197,7 +197,7 @@ module Extensions
|
|
197
197
|
block = create_block parent, :image, nil, attrs, opts
|
198
198
|
if title
|
199
199
|
block.title = title
|
200
|
-
block.assign_caption (attrs.delete 'caption'), (opts[:caption_context] ||
|
200
|
+
block.assign_caption (attrs.delete 'caption'), (opts[:caption_context] || :image)
|
201
201
|
end
|
202
202
|
block
|
203
203
|
end
|
data/lib/asciidoctor/helpers.rb
CHANGED
@@ -9,7 +9,7 @@ module Helpers
|
|
9
9
|
# passes a message to Kernel#raise if on_failure is :abort or Kernel#warn if
|
10
10
|
# on_failure is :warn to communicate to the user that processing is being
|
11
11
|
# aborted or functionality is disabled, respectively. If a gem_name is
|
12
|
-
# specified, the message communicates that a required gem is not
|
12
|
+
# specified, the message communicates that a required gem is not available.
|
13
13
|
#
|
14
14
|
# name - the String name of the library to require.
|
15
15
|
# gem_name - a Boolean that indicates whether this library is provided by a RubyGem,
|
data/lib/asciidoctor/list.rb
CHANGED
@@ -66,7 +66,7 @@ class ListItem < AbstractBlock
|
|
66
66
|
# Public: A convenience method that checks whether the text of this list item
|
67
67
|
# is not blank (i.e., not nil or empty string).
|
68
68
|
def text?
|
69
|
-
|
69
|
+
@text.nil_or_empty? ? false : true
|
70
70
|
end
|
71
71
|
|
72
72
|
# Public: Get the String text of this ListItem with substitutions applied.
|
@@ -103,27 +103,11 @@ class ListItem < AbstractBlock
|
|
103
103
|
!simple?
|
104
104
|
end
|
105
105
|
|
106
|
-
# Internal: Fold the
|
107
|
-
#
|
108
|
-
# Here are the rules for when a folding occurs:
|
109
|
-
#
|
110
|
-
# Given: this list item has at least one block
|
111
|
-
# When: the first block is a paragraph that's not connected by a list continuation
|
112
|
-
# Or: the first block is an indented paragraph that's adjacent (wrapped line)
|
113
|
-
# Or: the first block is an indented paragraph that's not connected by a list continuation
|
114
|
-
# Then: then drop the first block and fold it's content (buffer) into the list text
|
106
|
+
# Internal: Fold the adjacent paragraph block into the list item text
|
115
107
|
#
|
116
108
|
# Returns nothing
|
117
|
-
def fold_first
|
118
|
-
|
119
|
-
if first_block.context == :literal
|
120
|
-
if (content_adjacent || !continuation_connects_first_block) # && first_block.attributes['listparagraph-option']
|
121
|
-
@text = @text.nil_or_empty? ? @blocks.shift.source : %(#{@text}#{LF}#{@blocks.shift.source})
|
122
|
-
end
|
123
|
-
elsif first_block.context == :paragraph && !continuation_connects_first_block
|
124
|
-
@text = @text.nil_or_empty? ? @blocks.shift.source : %(#{@text}#{LF}#{@blocks.shift.source})
|
125
|
-
end
|
126
|
-
end
|
109
|
+
def fold_first
|
110
|
+
@text = @text.nil_or_empty? ? @blocks.shift.source : %(#{@text}#{LF}#{@blocks.shift.source})
|
127
111
|
nil
|
128
112
|
end
|
129
113
|
|
data/lib/asciidoctor/parser.rb
CHANGED
@@ -469,7 +469,8 @@ class Parser
|
|
469
469
|
# attributes - A Hash of attributes that will become the attributes
|
470
470
|
# associated with the parsed Block (default: {}).
|
471
471
|
# options - An options Hash to control parsing (default: {}):
|
472
|
-
# * :
|
472
|
+
# * :text_only indicates that the parser is only looking for text content
|
473
|
+
# * :list_type indicates this block will be attached to a list item in a list of the specified type
|
473
474
|
#
|
474
475
|
# Returns a Block object built from the parsed content of the processed
|
475
476
|
# lines, or nothing if no block is found.
|
@@ -480,15 +481,15 @@ class Parser
|
|
480
481
|
# check for option to find list item text only
|
481
482
|
# if skipped a line, assume a list continuation was
|
482
483
|
# used and block content is acceptable
|
483
|
-
if (text_only = options[:
|
484
|
-
options.delete :
|
484
|
+
if (text_only = options[:text_only]) && skipped > 0
|
485
|
+
options.delete :text_only
|
485
486
|
text_only = nil
|
486
487
|
end
|
487
488
|
|
488
489
|
document = parent.document
|
489
490
|
|
490
491
|
if options.fetch :parse_metadata, true
|
491
|
-
# read lines until there are no more metadata lines to read
|
492
|
+
# read lines until there are no more metadata lines to read; note that :text_only option impacts parsing rules
|
492
493
|
while parse_block_metadata_line reader, document, attributes, options
|
493
494
|
# discard the line just processed
|
494
495
|
reader.shift
|
@@ -604,7 +605,7 @@ class Parser
|
|
604
605
|
end
|
605
606
|
if attributes['title']
|
606
607
|
block.title = block_title = attributes.delete 'title'
|
607
|
-
block.assign_caption (attributes.delete 'caption')
|
608
|
+
block.assign_caption (attributes.delete 'caption')
|
608
609
|
end
|
609
610
|
end
|
610
611
|
attributes['target'] = target
|
@@ -722,17 +723,17 @@ class Parser
|
|
722
723
|
# a literal paragraph: contiguous lines starting with at least one whitespace character
|
723
724
|
# NOTE style can only be nil or "normal" at this point
|
724
725
|
if indented && !style
|
725
|
-
lines = read_paragraph_lines reader, (
|
726
|
+
lines = read_paragraph_lines reader, (content_adjacent = skipped == 0 ? options[:list_type] : nil), skip_line_comments: text_only
|
726
727
|
adjust_indentation! lines
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
block
|
728
|
+
if text_only || content_adjacent == :dlist
|
729
|
+
# this block gets folded into the list item text
|
730
|
+
block = Block.new(parent, :paragraph, content_model: :simple, source: lines, attributes: attributes)
|
731
|
+
else
|
732
|
+
block = Block.new(parent, :literal, content_model: :verbatim, source: lines, attributes: attributes)
|
732
733
|
end
|
733
734
|
# a normal paragraph: contiguous non-blank/non-continuation lines (left-indented or normal style)
|
734
735
|
else
|
735
|
-
lines = read_paragraph_lines reader, skipped == 0 && options[:
|
736
|
+
lines = read_paragraph_lines reader, skipped == 0 && options[:list_type], skip_line_comments: true
|
736
737
|
# NOTE don't check indented here since it's extremely rare
|
737
738
|
#if text_only || indented
|
738
739
|
if text_only
|
@@ -897,8 +898,8 @@ class Parser
|
|
897
898
|
# FIXME title and caption should be assigned when block is constructed (though we need to handle all cases)
|
898
899
|
if attributes['title']
|
899
900
|
block.title = block_title = attributes.delete 'title'
|
900
|
-
if
|
901
|
-
block.assign_caption (attributes.delete 'caption')
|
901
|
+
if (caption_attr_name = CAPTION_ATTR_NAMES[block.context]) && document.attributes[caption_attr_name]
|
902
|
+
block.assign_caption (attributes.delete 'caption')
|
902
903
|
end
|
903
904
|
end
|
904
905
|
# TODO eventually remove the style attribute from the attributes hash
|
@@ -1333,31 +1334,25 @@ class Parser
|
|
1333
1334
|
comment_lines = list_item_reader.skip_line_comments
|
1334
1335
|
if (subsequent_line = list_item_reader.peek_line)
|
1335
1336
|
list_item_reader.unshift_lines comment_lines unless comment_lines.empty?
|
1336
|
-
|
1337
|
-
content_adjacent = false
|
1338
|
-
else
|
1337
|
+
unless subsequent_line.empty?
|
1339
1338
|
content_adjacent = true
|
1340
1339
|
# treat lines as paragraph text if continuation does not connect first block (i.e., has_text = nil)
|
1341
1340
|
has_text = nil unless dlist
|
1342
1341
|
end
|
1343
|
-
else
|
1344
|
-
# NOTE we have no use for any trailing comment lines we might have found
|
1345
|
-
continuation_connects_first_block = false
|
1346
|
-
content_adjacent = false
|
1347
1342
|
end
|
1348
1343
|
|
1349
1344
|
# reader is confined to boundaries of list, which means only blocks will be found (no sections)
|
1350
|
-
if (block = next_block(list_item_reader, list_item, {},
|
1345
|
+
if (block = next_block(list_item_reader, list_item, {}, text_only: has_text ? nil : true, list_type: list_type))
|
1351
1346
|
list_item.blocks << block
|
1352
1347
|
end
|
1353
1348
|
|
1354
1349
|
while list_item_reader.has_more_lines?
|
1355
|
-
if (block = next_block(list_item_reader, list_item, {},
|
1350
|
+
if (block = next_block(list_item_reader, list_item, {}, list_type: list_type))
|
1356
1351
|
list_item.blocks << block
|
1357
1352
|
end
|
1358
1353
|
end
|
1359
1354
|
|
1360
|
-
list_item.fold_first(
|
1355
|
+
list_item.fold_first if content_adjacent && (first_block = list_item.blocks[0]) && first_block.context == :paragraph
|
1361
1356
|
end
|
1362
1357
|
|
1363
1358
|
dlist ? [[list_term], (list_item.text? || list_item.blocks? ? list_item : nil)] : list_item
|
@@ -1537,19 +1532,19 @@ class Parser
|
|
1537
1532
|
|
1538
1533
|
reader.unshift_line this_line if this_line
|
1539
1534
|
|
1540
|
-
if detached_continuation
|
1541
|
-
buffer.delete_at detached_continuation
|
1542
|
-
end
|
1543
|
-
|
1544
|
-
# strip trailing blank lines to prevent empty blocks
|
1545
|
-
buffer.pop while !buffer.empty? && buffer[-1].empty?
|
1535
|
+
buffer.delete_at detached_continuation if detached_continuation
|
1546
1536
|
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1551
|
-
|
1552
|
-
|
1537
|
+
until buffer.empty?
|
1538
|
+
# strip trailing blank lines to prevent empty blocks
|
1539
|
+
if (last_line = buffer[-1]).empty?
|
1540
|
+
buffer.pop
|
1541
|
+
else
|
1542
|
+
# drop optional trailing continuation
|
1543
|
+
# (a blank line would have served the same purpose in the document)
|
1544
|
+
buffer.pop if last_line == LIST_CONTINUATION
|
1545
|
+
break
|
1546
|
+
end
|
1547
|
+
end
|
1553
1548
|
|
1554
1549
|
buffer
|
1555
1550
|
end
|
@@ -1987,7 +1982,7 @@ class Parser
|
|
1987
1982
|
# document - the current Document
|
1988
1983
|
# attributes - a Hash of attributes in which any metadata found will be stored (default: {})
|
1989
1984
|
# options - a Hash of options to control processing: (default: {})
|
1990
|
-
# * :
|
1985
|
+
# * :text_only indicates that parser is only looking for text content
|
1991
1986
|
# and thus the block title should not be captured
|
1992
1987
|
#
|
1993
1988
|
# returns the Hash of attributes including any metadata found
|
@@ -2016,13 +2011,13 @@ class Parser
|
|
2016
2011
|
# document - the current Document
|
2017
2012
|
# attributes - a Hash of attributes in which any metadata found will be stored
|
2018
2013
|
# options - a Hash of options to control processing: (default: {})
|
2019
|
-
# * :
|
2014
|
+
# * :text_only indicates the parser is only looking for text content,
|
2020
2015
|
# thus neither a block title or attribute entry should be captured
|
2021
2016
|
#
|
2022
2017
|
# returns true if the line contains metadata, otherwise falsy
|
2023
2018
|
def self.parse_block_metadata_line reader, document, attributes, options = {}
|
2024
2019
|
if (next_line = reader.peek_line) &&
|
2025
|
-
(options[:
|
2020
|
+
(options[:text_only] ? (next_line.start_with? '[', '/') : (normal = next_line.start_with? '[', '.', '/', ':'))
|
2026
2021
|
if next_line.start_with? '['
|
2027
2022
|
if next_line.start_with? '[['
|
2028
2023
|
if (next_line.end_with? ']]') && BlockAnchorRx =~ next_line
|
data/lib/asciidoctor/table.rb
CHANGED
@@ -358,6 +358,14 @@ class Table::Cell < AbstractBlock
|
|
358
358
|
end
|
359
359
|
end
|
360
360
|
|
361
|
+
def lines
|
362
|
+
@text.split LF
|
363
|
+
end
|
364
|
+
|
365
|
+
def source
|
366
|
+
@text
|
367
|
+
end
|
368
|
+
|
361
369
|
# Public: Get the source file where this block started
|
362
370
|
def file
|
363
371
|
@source_location && @source_location.file
|
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-03-
|
4
|
+
.\" Generator: Asciidoctor 2.0.2
|
5
|
+
.\" Date: 2019-03-26
|
6
6
|
.\" Manual: Asciidoctor Manual
|
7
|
-
.\" Source: Asciidoctor 2.0.
|
7
|
+
.\" Source: Asciidoctor 2.0.2
|
8
8
|
.\" Language: English
|
9
9
|
.\"
|
10
|
-
.TH "ASCIIDOCTOR" "1" "2019-03-
|
10
|
+
.TH "ASCIIDOCTOR" "1" "2019-03-26" "Asciidoctor 2.0.2" "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
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.
|
4
|
+
version: 2.0.2
|
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-
|
16
|
+
date: 2019-03-26 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: asciimath
|