summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2021-05-07 01:43:47 -0600
committerDan Allen <dan.j.allen@gmail.com>2021-05-07 01:43:47 -0600
commitca304b110ddbd03b3b7baa70dffa4afc2b3d45bf (patch)
treebb7bcef0b45fee398169ab85fc26a6c1b49bda35 /lib
parentf869601be50e110a67788f9b10478f8b50077ec8 (diff)
consistently use += for self assignment
Diffstat (limited to 'lib')
-rw-r--r--lib/asciidoctor/parser.rb12
-rw-r--r--lib/asciidoctor/substitutors.rb4
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/asciidoctor/parser.rb b/lib/asciidoctor/parser.rb
index f8e25093..5b11cadc 100644
--- a/lib/asciidoctor/parser.rb
+++ b/lib/asciidoctor/parser.rb
@@ -2571,7 +2571,7 @@ class Parser
accum = ''
name = :option
else
- accum = accum + c
+ accum += c
end
end
@@ -2682,16 +2682,16 @@ class Parser
if c == TAB
# calculate how many spaces this tab represents, then replace tab with spaces
if (offset = idx + spaces_added) % tab_size == 0
- spaces_added += (tab_size - 1)
- result = result + full_tab_space
+ spaces_added += tab_size - 1
+ result += full_tab_space
else
unless (spaces = tab_size - offset % tab_size) == 1
- spaces_added += (spaces - 1)
+ spaces_added += spaces - 1
end
- result = result + (' ' * spaces)
+ result += ' ' * spaces
end
else
- result = result + c
+ result += c
end
idx += 1
end
diff --git a/lib/asciidoctor/substitutors.rb b/lib/asciidoctor/substitutors.rb
index 15822527..54ae62fe 100644
--- a/lib/asciidoctor/substitutors.rb
+++ b/lib/asciidoctor/substitutors.rb
@@ -1534,7 +1534,7 @@ module Substitutors
case c
when ','
if quote_open
- accum = accum + c
+ accum += c
else
values << accum.strip
accum = ''
@@ -1542,7 +1542,7 @@ module Substitutors
when '"'
quote_open = !quote_open
else
- accum = accum + c
+ accum += c
end
end
values << accum.strip