summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Ziegler <austin@zieglers.ca>2021-12-23 11:30:59 -0500
committerAustin Ziegler <austin@zieglers.ca>2021-12-23 11:45:41 -0500
commit8b0e24e8d7d6fc7c23369aa5488e9292521ff41c (patch)
tree407552d91e70740d9e1f1969f40bb7d939ba8324
parent813b9e7c842a2f83e8433be95451732f80bfd786 (diff)
downloaddiff-lcs-8b0e24e8d7d6fc7c23369aa5488e9292521ff41c.tar.gz
standardrb --only Standard/BlockSingleLineBraces --fix
-rw-r--r--lib/diff/lcs/htmldiff.rb8
-rw-r--r--spec/diff_spec.rb2
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/diff/lcs/htmldiff.rb b/lib/diff/lcs/htmldiff.rb
index a57dd51..325dc95 100644
--- a/lib/diff/lcs/htmldiff.rb
+++ b/lib/diff/lcs/htmldiff.rb
@@ -120,12 +120,12 @@ h1 { margin-left: 2em; }
formatter = Text::Format.new
formatter.tabstop = @options[:expand_tabs]
- @left.map! do |line| formatter.expand(line.chomp) end
- @right.map! do |line| formatter.expand(line.chomp) end
+ @left.map! { |line| formatter.expand(line.chomp) }
+ @right.map! { |line| formatter.expand(line.chomp) }
end
- @left.map! do |line| CGI.escapeHTML(line.chomp) end
- @right.map! do |line| CGI.escapeHTML(line.chomp) end
+ @left.map! { |line| CGI.escapeHTML(line.chomp) }
+ @right.map! { |line| CGI.escapeHTML(line.chomp) }
# standard:disable Layout/HeredocIndentation
@options[:output] << <<-OUTPUT
diff --git a/spec/diff_spec.rb b/spec/diff_spec.rb
index bd0776a..869f098 100644
--- a/spec/diff_spec.rb
+++ b/spec/diff_spec.rb
@@ -30,7 +30,7 @@ describe Diff::LCS, ".diff" do
diff = Diff::LCS.diff([], word_sequence)
correct_diff.each do |hunk|
- hunk.each do |change| change[0] = "+" end
+ hunk.each { |change| change[0] = "+" }
end
expect(change_diff(correct_diff)).to eq(diff)
end