summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2021-06-02 23:42:21 -0600
committerDan Allen <dan.j.allen@gmail.com>2021-06-03 00:42:35 -0600
commit76d1e95aa2a79cd113a4bbc56a703004df08896e (patch)
tree10f11df8d1a9e7cf97b08dbf2802b5911430a372
parent296b947bc007f9a09f45a615bb7243eabc6978f5 (diff)
use comma after last entry in multi-line array [skip ci]
-rw-r--r--lib/asciidoctor.rb4
-rw-r--r--lib/asciidoctor/parser.rb2
-rw-r--r--test/extensions_test.rb2
-rw-r--r--test/lists_test.rb2
-rw-r--r--test/sections_test.rb2
-rw-r--r--test/substitutions_test.rb4
-rw-r--r--test/text_test.rb14
7 files changed, 15 insertions, 15 deletions
diff --git a/lib/asciidoctor.rb b/lib/asciidoctor.rb
index 26989788..2a7f02c9 100644
--- a/lib/asciidoctor.rb
+++ b/lib/asciidoctor.rb
@@ -465,7 +465,7 @@ module Asciidoctor
# ^superscript^
[:superscript, :unconstrained, /\\?(?:\[([^\]]+)\])?\^(\S+?)\^/],
# ~subscript~
- [:subscript, :unconstrained, /\\?(?:\[([^\]]+)\])?~(\S+?)~/]
+ [:subscript, :unconstrained, /\\?(?:\[([^\]]+)\])?~(\S+?)~/],
]
accum[true] = compat = normal.drop 0
@@ -513,7 +513,7 @@ module Asciidoctor
# left double arrow <=
[/\\?&lt;=/, '&#8656;', :none],
# restore entities
- [/\\?(&)amp;((?:[a-zA-Z][a-zA-Z]+\d{0,2}|#\d\d\d{0,4}|#x[\da-fA-F][\da-fA-F][\da-fA-F]{0,3});)/, '', :bounding]
+ [/\\?(&)amp;((?:[a-zA-Z][a-zA-Z]+\d{0,2}|#\d\d\d{0,4}|#x[\da-fA-F][\da-fA-F][\da-fA-F]{0,3});)/, '', :bounding],
]
# Internal: Automatically load the Asciidoctor::Extensions module.
diff --git a/lib/asciidoctor/parser.rb b/lib/asciidoctor/parser.rb
index 228bc12e..334257e6 100644
--- a/lib/asciidoctor/parser.rb
+++ b/lib/asciidoctor/parser.rb
@@ -1866,7 +1866,7 @@ class Parser
authors[idx] = [
author_metadata[%(firstname_#{name_idx = idx + 1})],
author_metadata[%(middlename_#{name_idx})],
- author_metadata[%(lastname_#{name_idx})]
+ author_metadata[%(lastname_#{name_idx})],
].compact.map {|it| it.tr ' ', '_' }.join ' '
end if sparse
# process as names only
diff --git a/test/extensions_test.rb b/test/extensions_test.rb
index b2dc3da3..42c1b25f 100644
--- a/test/extensions_test.rb
+++ b/test/extensions_test.rb
@@ -673,7 +673,7 @@ context 'Extensions' do
content = [
%(found include target '#{target}' at line #{reader.cursor_at_prev_line.lineno}\r\n),
%(\r\n),
- %(middle line\r\n)
+ %(middle line\r\n),
]
reader.push_include content, target, target, 1, attributes
end
diff --git a/test/lists_test.rb b/test/lists_test.rb
index bfde2309..185819c2 100644
--- a/test/lists_test.rb
+++ b/test/lists_test.rb
@@ -4931,7 +4931,7 @@ context 'Callout lists' do
assert_xpath '//ol/li', output, 2
assert_messages logger, [
[:WARN, '<stdin>: line 8: callout list item index: expected 2, got 3', Hash],
- [:WARN, '<stdin>: line 8: no callout found for <2>', Hash]
+ [:WARN, '<stdin>: line 8: no callout found for <2>', Hash],
]
end
end
diff --git a/test/sections_test.rb b/test/sections_test.rb
index 8b30f6fa..94b852f3 100644
--- a/test/sections_test.rb
+++ b/test/sections_test.rb
@@ -933,7 +933,7 @@ context 'Sections' do
[:ERROR, '<stdin>: line 14: colophon sections do not support nested sections', Hash],
[:ERROR, '<stdin>: line 21: dedication sections do not support nested sections', Hash],
[:ERROR, '<stdin>: line 50: glossary sections do not support nested sections', Hash],
- [:ERROR, '<stdin>: line 57: bibliography sections do not support nested sections', Hash]
+ [:ERROR, '<stdin>: line 57: bibliography sections do not support nested sections', Hash],
]
end
end
diff --git a/test/substitutions_test.rb b/test/substitutions_test.rb
index 2b218b34..afeb8e9e 100644
--- a/test/substitutions_test.rb
+++ b/test/substitutions_test.rb
@@ -2221,7 +2221,7 @@ context 'Substitutions' do
%(It's Mary`'s little lamb.),
%(consecutive single quotes '' are not modified),
%(he is 6' tall),
- %(\\`')
+ %(\\`'),
]
expected = [
%(&#8217;Twas the night),
@@ -2233,7 +2233,7 @@ context 'Substitutions' do
%(It&#8217;s Mary&#8217;s little lamb.),
%(consecutive single quotes '' are not modified),
%(he is 6' tall),
- %(`')
+ %(`'),
]
given.size.times do |i|
para = block_from_string given[i]
diff --git a/test/text_test.rb b/test/text_test.rb
index 91405bf2..df26f8a1 100644
--- a/test/text_test.rb
+++ b/test/text_test.rb
@@ -95,14 +95,14 @@ context 'Text' do
'***',
'* * *',
'___',
- '_ _ _'
+ '_ _ _',
]
offsets = [
'',
' ',
' ',
- ' '
+ ' ',
]
variants.each do |variant|
@@ -127,14 +127,14 @@ context 'Text' do
bad_variants = [
'- - - -',
'* * * *',
- '_ _ _ _'
+ '_ _ _ _',
]
good_offsets = [
'',
' ',
' ',
- ' '
+ ' ',
]
bad_variants.each do |variant|
@@ -154,12 +154,12 @@ context 'Text' do
good_variants = [
'- - -',
'* * *',
- '_ _ _'
+ '_ _ _',
]
bad_offsets = [
- "\t",
- ' '
+ ?\t,
+ ' ',
]
good_variants.each do |variant|