Skip to content

Commit

Permalink
use consistent terminator for heredoc
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Oct 5, 2023
1 parent 2662aaf commit c0f28ce
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions spec/image_spec.rb
Original file line number Diff line number Diff line change
@@ -1350,7 +1350,7 @@ def traverse node
thematic_break_border_color: '0000FF',
thematic_break_border_width: 1,
}
input = <<~'END'
input = <<~'EOS'
left column
[.column]
@@ -1359,7 +1359,7 @@ def traverse node
---
image::tux.jpg[pdfwidth=50%]
END
EOS

lines = (to_pdf input, pdf_theme: pdf_theme, analyze: :line).lines
thematic_break_line = lines.find {|it| it[:color] == '0000FF' && it[:width] == 1 }
@@ -1377,7 +1377,7 @@ def traverse node
thematic_break_border_color: '0000FF',
thematic_break_border_width: 1,
}
input = <<~'END'
input = <<~'EOS'
left column
[.column]
@@ -1386,7 +1386,7 @@ def traverse node
---
image::tux.jpg[align=right,pdfwidth=50%]
END
EOS

lines = (to_pdf input, pdf_theme: pdf_theme, analyze: :line).lines
thematic_break_line = lines.find {|it| it[:color] == '0000FF' && it[:width] == 1 }
@@ -2167,14 +2167,14 @@ def traverse node

it 'should not warn about missing glyph for image placeholder char when using AFM font' do
(expect do
pdf = to_pdf <<~'END', attribute_overrides: { 'pdf-theme' => 'base' }, analyze: :image
pdf = to_pdf <<~'EOS', attribute_overrides: { 'pdf-theme' => 'base' }, analyze: :image
:pdf-page-size: A6
:pdf-page-layout: landscape
before
image:square.png[pdfwidth=7cm]
END
EOS
(expect (images = pdf.images)).to have_size 1
(expect images[0][:page_number]).to be 2
end).to not_log_message using_log_level: :INFO
4 changes: 2 additions & 2 deletions spec/source_spec.rb
Original file line number Diff line number Diff line change
@@ -1228,11 +1228,11 @@ class Type; end

it 'should not crash if source highlighter is enabled and subs is set on empty block' do
(expect do
input = <<~'END'
input = <<~'EOS'
[source,ruby,subs=attributes+]
----
----
END
EOS
lines = (to_pdf input, attribute_overrides: { 'source-highlighter' => 'coderay' }, analyze: :line).lines
text = (to_pdf input, attribute_overrides: { 'source-highlighter' => 'coderay' }, analyze: true).text
(expect (lines[0][:from][:y] - lines[1][:from][:y]).abs).to be < 5
4 changes: 2 additions & 2 deletions spec/toc_spec.rb
Original file line number Diff line number Diff line change
@@ -181,7 +181,7 @@
end

it 'should include dot leaders in TOC entry if toclevels is increased for a given section' do
pdf = to_pdf <<~'END', analyze: true
pdf = to_pdf <<~'EOS', analyze: true
= Document Title
:doctype: book
:toc:
@@ -199,7 +199,7 @@
=== Lorem Ipsum Section
==== Lorem Ipsum Subsection
END
EOS

toc_lines = pdf.lines pdf.find_text page_number: 2
(expect toc_lines).to have_size 5

0 comments on commit c0f28ce

Please sign in to comment.