Skip to content

Commit 0ee1017

Browse files
committed
Update snapshots
1 parent 5163833 commit 0ee1017

32 files changed

Lines changed: 42 additions & 109 deletions

File tree

test/snapshots/herb/template_handler_test/test_0002_error_for_invalid_html_compiled_f220a3f39ac7d7adca10aee52ae53d26.txt

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
@output_buffer << ('<template data-herb-parser-error><div class="herb-parser-error-overlay">
32
<style>
43
.herb-parser-error-overlay * {
@@ -299,10 +298,10 @@
299298
<div class="herb-error-header-content">
300299
<div class="herb-error-title">
301300
<div class="herb-error-icon">!</div>
302-
Template Errors (2)
301+
Template Error
303302
</div>
304303
<div class="herb-error-message">
305-
Tag `&lt;with_an_invalid_bracket&gt;` opened at (1:27) was never closed before the end of document.
304+
Opening tag `&lt;with_an_invalid_bracket&gt;` at (1:27) doesn&#39;t have a matching closing tag `&lt;/with_an_invalid_bracket&gt;` in the same scope.
306305
</div>
307306
</div>
308307
</div>
@@ -311,53 +310,30 @@
311310
<div class="herb-code-section">
312311
<div class="herb-code-header">
313312
<div class="herb-file-icon">ERB</div>
314-
Error 1: UnclosedElement - test_template:1:52
313+
test_template:1:26
315314
</div>
316315
<div class="herb-error-message-section">
317-
<div class="herb-error-message">Tag `&lt;with_an_invalid_bracket&gt;` opened at (1:27) was never closed before the end of document.</div>
316+
<div class="herb-error-message">Opening tag `&lt;with_an_invalid_bracket&gt;` at (1:27) doesn&#39;t have a matching closing tag `&lt;/with_an_invalid_bracket&gt;` in the same scope.</div>
318317
</div>
319318
<div class="herb-code-content">
320319
<div class="herb-code-line herb-error-line">
321320
<div class="herb-line-number">1</div>
322321
<div class="herb-line-content">Plain text: <span class="herb-erb">&lt;%=</span><span class="herb-erb"> 1 + 1 </span><span class="herb-erb">%&gt;</span> (<span class="herb-tag">&lt;</span><span class="herb-tag">with_an_invalid_bracket</span><span class="herb-tag">&gt;</span>)</div>
323322
</div>
324323

325-
<div class="herb-error-pointer"> ^ ← Unclosed element</div>
326-
327-
</div>
328-
</div>
329-
330-
<div class="herb-code-section">
331-
<div class="herb-code-header">
332-
<div class="herb-file-icon">ERB</div>
333-
Error 2: MissingClosingTag - test_template:1:27
334-
</div>
335-
<div class="herb-error-message-section">
336-
<div class="herb-error-message">Opening tag `&lt;with_an_invalid_bracket&gt;` at (1:27) doesn&#39;t have a matching closing tag `&lt;/with_an_invalid_bracket&gt;`.</div>
337-
</div>
338-
<div class="herb-code-content">
339-
<div class="herb-code-line herb-error-line">
340-
<div class="herb-line-number">1</div>
341-
<div class="herb-line-content">Plain text: <span class="herb-erb">&lt;%=</span><span class="herb-erb"> 1 + 1 </span><span class="herb-erb">%&gt;</span> (<span class="herb-tag">&lt;</span><span class="herb-tag">with_an_invalid_bracket</span><span class="herb-tag">&gt;</span>)</div>
342-
</div>
343-
344-
<div class="herb-error-pointer"> ^~~~~~~~~~~~~~~~~~~~~~~~~~ ← Missing closing tag</div>
324+
<div class="herb-error-pointer"> ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ← Missing closing tag</div>
345325

346326
</div>
347327
</div>
348328

349329
<div class="herb-section">
350-
<div class="herb-section-header" data-section-id="suggestions-5f68fd073b7e13cdae96b20e85458fdc">
330+
<div class="herb-section-header" data-section-id="suggestions-a0caf34d3599b38196ac951dd3a71110">
351331
Suggestions
352-
<span class="herb-section-toggle" id="suggestions-5f68fd073b7e13cdae96b20e85458fdc-toggle">▼</span>
332+
<span class="herb-section-toggle" id="suggestions-a0caf34d3599b38196ac951dd3a71110-toggle">▼</span>
353333
</div>
354-
<div class="herb-section-content" id="suggestions-5f68fd073b7e13cdae96b20e85458fdc-content">
334+
<div class="herb-section-content" id="suggestions-a0caf34d3599b38196ac951dd3a71110-content">
355335
<div class="herb-suggestions">
356336
<div class="herb-suggestion-item">
357-
<div class="herb-suggestion-title">Close unclosed element</div>
358-
<div>Add &lt;/with_an_invalid_bracket&gt; before the end of the template</div>
359-
</div>
360-
<div class="herb-suggestion-item">
361337
<div class="herb-suggestion-title">Add missing closing tag</div>
362338
<div>Add &lt;/with_an_invalid_bracket&gt; to close the opening tag</div>
363339
</div>

test/snapshots/herb/template_handler_test/test_0002_error_for_invalid_html_evaluated_d2673f801903b3abc4919f4fef7798b7.txt

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,10 @@
298298
<div class="herb-error-header-content">
299299
<div class="herb-error-title">
300300
<div class="herb-error-icon">!</div>
301-
Template Errors (2)
301+
Template Error
302302
</div>
303303
<div class="herb-error-message">
304-
Tag `&lt;with_an_invalid_bracket&gt;` opened at (1:27) was never closed before the end of document.
304+
Opening tag `&lt;with_an_invalid_bracket&gt;` at (1:27) doesn&#39;t have a matching closing tag `&lt;/with_an_invalid_bracket&gt;` in the same scope.
305305
</div>
306306
</div>
307307
</div>
@@ -310,53 +310,30 @@
310310
<div class="herb-code-section">
311311
<div class="herb-code-header">
312312
<div class="herb-file-icon">ERB</div>
313-
Error 1: UnclosedElement - test_template:1:52
313+
test_template:1:26
314314
</div>
315315
<div class="herb-error-message-section">
316-
<div class="herb-error-message">Tag `&lt;with_an_invalid_bracket&gt;` opened at (1:27) was never closed before the end of document.</div>
316+
<div class="herb-error-message">Opening tag `&lt;with_an_invalid_bracket&gt;` at (1:27) doesn&#39;t have a matching closing tag `&lt;/with_an_invalid_bracket&gt;` in the same scope.</div>
317317
</div>
318318
<div class="herb-code-content">
319319
<div class="herb-code-line herb-error-line">
320320
<div class="herb-line-number">1</div>
321321
<div class="herb-line-content">Plain text: <span class="herb-erb">&lt;%=</span><span class="herb-erb"> 1 + 1 </span><span class="herb-erb">%&gt;</span> (<span class="herb-tag">&lt;</span><span class="herb-tag">with_an_invalid_bracket</span><span class="herb-tag">&gt;</span>)</div>
322322
</div>
323323

324-
<div class="herb-error-pointer"> ^ ← Unclosed element</div>
325-
326-
</div>
327-
</div>
328-
329-
<div class="herb-code-section">
330-
<div class="herb-code-header">
331-
<div class="herb-file-icon">ERB</div>
332-
Error 2: MissingClosingTag - test_template:1:27
333-
</div>
334-
<div class="herb-error-message-section">
335-
<div class="herb-error-message">Opening tag `&lt;with_an_invalid_bracket&gt;` at (1:27) doesn&#39;t have a matching closing tag `&lt;/with_an_invalid_bracket&gt;`.</div>
336-
</div>
337-
<div class="herb-code-content">
338-
<div class="herb-code-line herb-error-line">
339-
<div class="herb-line-number">1</div>
340-
<div class="herb-line-content">Plain text: <span class="herb-erb">&lt;%=</span><span class="herb-erb"> 1 + 1 </span><span class="herb-erb">%&gt;</span> (<span class="herb-tag">&lt;</span><span class="herb-tag">with_an_invalid_bracket</span><span class="herb-tag">&gt;</span>)</div>
341-
</div>
342-
343-
<div class="herb-error-pointer"> ^~~~~~~~~~~~~~~~~~~~~~~~~~ ← Missing closing tag</div>
324+
<div class="herb-error-pointer"> ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ← Missing closing tag</div>
344325

345326
</div>
346327
</div>
347328

348329
<div class="herb-section">
349-
<div class="herb-section-header" data-section-id="suggestions-5f68fd073b7e13cdae96b20e85458fdc">
330+
<div class="herb-section-header" data-section-id="suggestions-a0caf34d3599b38196ac951dd3a71110">
350331
Suggestions
351-
<span class="herb-section-toggle" id="suggestions-5f68fd073b7e13cdae96b20e85458fdc-toggle">▼</span>
332+
<span class="herb-section-toggle" id="suggestions-a0caf34d3599b38196ac951dd3a71110-toggle">▼</span>
352333
</div>
353-
<div class="herb-section-content" id="suggestions-5f68fd073b7e13cdae96b20e85458fdc-content">
334+
<div class="herb-section-content" id="suggestions-a0caf34d3599b38196ac951dd3a71110-content">
354335
<div class="herb-suggestions">
355336
<div class="herb-suggestion-item">
356-
<div class="herb-suggestion-title">Close unclosed element</div>
357-
<div>Add &lt;/with_an_invalid_bracket&gt; before the end of the template</div>
358-
</div>
359-
<div class="herb-suggestion-item">
360337
<div class="herb-suggestion-title">Add missing closing tag</div>
361338
<div>Add &lt;/with_an_invalid_bracket&gt; to close the opening tag</div>
362339
</div>
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
21
@output_buffer.safe_append='<h1>Hello '.freeze; @output_buffer.append=(@name); @output_buffer.safe_append='</h1>'.freeze;
32
@output_buffer
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
21
@output_buffer.append= link_to "/users", class: "btn" do; @output_buffer.safe_append='Click me'.freeze; end;
32
@output_buffer
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
21
@output_buffer.append=(@html); @output_buffer.append=(raw @safe_html);
32
@output_buffer

test/snapshots/herb/template_handler_test/test_0006_template_with_newlines_compiled_fb6e54a55f7be2b5f591f6b157d7cf76.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
@output_buffer.safe_append='<div>
32
'.freeze; @output_buffer.append=(@content); @output_buffer.safe_append='
43
</div>'.freeze;
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
21
@output_buffer.safe_append='<h1>Hello '.freeze; @output_buffer.append=(@name); @output_buffer.safe_append='!</h1><p>'.freeze; @output_buffer.append=(@message); @output_buffer.safe_append='</p>'.freeze;
32
@output_buffer
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
21
@output_buffer.safe_append='<div>'.freeze; @output_buffer.append=(@unsafe_content); @output_buffer.safe_append='</div>'.freeze;
32
@output_buffer
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
21
@output_buffer.append=(content_tag :div, "Hello", class: "greeting");
32
@output_buffer
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
21
@output_buffer.safe_append='<div class="user-card">
32
<h2>'.freeze; @output_buffer.append=(@user[:name]); @output_buffer.safe_append='</h2>
4-
'.freeze; if @user[:verified]; @output_buffer.safe_append='
5-
<span class="badge">Verified</span>
6-
'.freeze; end; @output_buffer.safe_append='
7-
'.freeze; @output_buffer.append= link_to user_path(@user[:id]), class: "btn btn-primary" do; @output_buffer.safe_append='
3+
'.freeze; if @user[:verified]
4+
@output_buffer.safe_append=' <span class="badge">Verified</span>
5+
'.freeze; end
6+
@output_buffer.safe_append=' '.freeze; @output_buffer.append= link_to user_path(@user[:id]), class: "btn btn-primary" do; @output_buffer.safe_append='
87
View Profile
9-
'.freeze; end; @output_buffer.safe_append='
10-
</div>
8+
'.freeze; end
9+
@output_buffer.safe_append='</div>
1110
'.freeze;
1211
@output_buffer

0 commit comments

Comments
 (0)